I’m using a ProjectileInterval Command in order to launch my projectile, but I want it to call an event if it hits something, like a particle effect. How would I do this? Would I have to use CollisionHandlerEvent? I’m still not entirely sure how the CollisionHandlerEvent works, so if someone could explain, that would be great.
The ProjectileInterval simply moves the object in a parabolic path. It knows nothing about hitting anything. If you want to detect whether your object hits something along the way, you have to use the normal collision system in addition to the ProjectileInterval.
David
I mean, how do you call an event when a collision is detected?
Panda do it for you but you have to tell him three things:
1- What object need to be checked every frame (your projectile).
2- Against which other objects does he needs to take collisions in consideration.
3- What to do when a collision is detected.
That’s the big idea after that you will need to follow Astelix’s tutorials and adapt them to your game.
You’ll find collisions very difficult to understand at the very begining but at one point everything will be clear as crystal
Enjoy
Yeah, I’m finding the collisionhandlerevent handler very difficult to understand.