(Solved) Collision working while the break animation is playing

Below is the event i am using for breaking stone but while the stone break animation is playing and if the player hits it again the animation starts over


You need to add a condition to prevent the player of being able to hit the stone again after it breaks.

Add this condition to the first event (along with E key is released):

  • The variable Hitsmine of Milestone < 4

So i did this


and it is working but the player animation of hitting keeps playing while the stone break animation plays

You’ll also need to add conditions to the player animations event to not change the player’s animation to Hitting if the stone is already destroyed.

Can you share a screenshot of the player animations event?



here

The event in the 2nd screenshot is the same as the event used to hit the stone. So you can change State of the player when hitting the stone in the same event, instead of having 2 separate events.


did it but it is still playing

Try adding one of these conditions to the first event (along with e is released):

  • (invert) animation of Minestone is “StoneHit”
    or this
  • The animation of Minestone is “stone”

One other thing, it’s better to add 1 to the Hitsmine as soon as the stone is hit, rather than waiting for the animation to finish.


So i did that but the player animation still plays and moving the variable up there creates one more problem that if i press e repeatedly it adds the variable before the player animation or stone animation


so i did this and it seems to stop the player animation problem but still the variable adding problem exists

It’s because of the “wait” action. Using a “State” variable to the stone should fix it.

Thank you it’s finally working the way i wanted ^^

1 Like