
09-21-2010, 05:29 PM
There are many examples of this in the forums, but the easiest way is to make an actual bullet, and and put in an event saying "While(bullet) is within 2 meters of (enemy)", "enemy turn backwards 0.25 revolutions". This however is not the most accurate way to do it because you might be able to aim next to the person and still have it count as a hit. For a beginner programmer though, I recommend using the code I just said.
If you feel you know a little more about Alice and you are able to understand more complex code, you can check out any of the gun games made here on the forums, I know that Debussybunny just made a new gun game with a good way of detecting bullets. Also, I am going to finish my Sniper example in a few days hopefully which should provide a fairly accurate bullet collision example.
Check out my best projects so far and please comment:
Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
|