Page 1 of 1

Stopping a bullet

PostPosted: Wed Nov 24, 2004 3:12 pm
by raptor1313666
Greetings,

I'm currently evaluating the utility of Game Editor by prototyping an upcoming 2D project for my rather small indie company. While most of my time has been spent muddling through the evaluation version, I'm quite pleased so far.

Anyway, I currently have a "game" where you click on a point in the screen and the player fires a projectile at the mouse coordinates. This "bullet" so-to-speak (it will be many different things, in truth), fires and travels to the point just fine. It even stops, as it should, at the specified location (where the mouse was at the time of the firing).

My question is this: How can I destroy the bullet actor once it's reached it point? The bullet does collide with enemies on the screen, but there is also the chance for it to "miss" and merely collide with the ground.

Right now, the bullet just stops and stays persistent until an enemy collides with it. While an interesting effect that I'll keep around for other weapon styles, it's not what I'm aiming for right now (no pun intended).

Is there some sort of "on actor stop" event that I can use to trigger this destroy event? Or is there some other way to achieve what I'm after?

Please note I only start using this thing late last night, so I definitely haven't explored all avenues.

I thank any of you in advance for your responses and your time!

PostPosted: Wed Nov 24, 2004 8:59 pm
by jazz_e_bob
pseudocode follows...

On Draw Bullet:
if directionalvelocity is 0
destroy event actor

:wink:

Have fun!

PostPosted: Fri Nov 26, 2004 12:27 am
by raptor1313666
jazz_e_bob wrote:pseudocode follows...

On Draw Bullet:
if directionalvelocity is 0
destroy event actor

:wink:

Have fun!


Thanks, that did it perfectly!