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.
Something like:

 if within(img "asteroid1",loc of grc bullet1) then runExplosion

The within function should correctly detect opaque and transparent regions
of an image.

Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia & Design
-----
E: [EMAIL PROTECTED]
W: http://www.tactilemedia.com


_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to