So I'm making a game where a tank has to shoot ninja stars and destroy trees but when I use the collision event only one ninja star destroys the tree. What I'm trying to do is that 5 ninja stars destroy the tree instead of just 1, how do I do that?
Develop games in your browser. Powerful, performant & highly capable.
Create an instance variable on tree to handle the tree "life"
So, change your colision event, instead of destroy the tree on colision, you replace it with:
On Star colision with Tree:
Set tree.life = tree.life -1;
And create an IF:
if tree.life = 0
Thank you so much.