Collision Detection w/o AE
scott at tactilemedia.com
Sun Oct 8 12:10:46 CDT 2006
Recently, Mark Greenberg wrote:
> ... suggestions about collision detection.
> ...The students are
> making an educational game about the solar system. It resembles the
> old Space Invaders, with asteroids falling from the sky and a space
> ship that slides left and right to shoot them. The asteroids have
> the answers to questions on them. The students need to script a
> handler for when the bullets hit the asteroids.
If the bullets are not large objects (ie they small images or graphics) you
could script something like this fairly easily using the within function.
if within(img "asteroid1",loc of grc bullet1) then runExplosion
The within function should correctly detect opaque and transparent regions
of an image.
Tactile Media, Multimedia & Design
E: scott at tactilemedia.com
More information about the use-livecode