Crusher type enemy (like Thwomp from Mario)

Hello, I am trying to code a crusher type enemy like the Thwomp from Mario. Everything goes well; it shakes before dropping, drops within the designated time, and makes the player respawn if it makes contact with the Thwomp. One issue I had though is that the Thwomp doesn’t rise after falling down. I’ve tried different ways but I haven’t been able to crack it. Relevant screenshot below.

That’s because the falling tween is named “slam_down”:

image


and you’ve misnamed it in the condition as “Falling”:

image

I changed the “slam_down” to “Falling” but it still didn’t rise back up. Any idea why?

Yeah. Animation is set to “Falling” in the action when you tween the slam:

image


but the check is for animation is “Idle”:

image

So what should i change to make everything work?

Q: What are you trying to achieve there?
A: You want to check the player is finished the slam down step.

Q: What are the states you need to check?
A: That the falling tween has finished.

That’s pretty much it. You can get rid of the check animation condition and get rid of the trigger once because you are removing the “Falling” tween, so the “tween is finished” condition will only be true once.

TYSM i removed the check for ‘idle’ animation and it worked. But for some reason if i respawn after getting hit by the thwomp, it doesn’t restart the animations again

As in the Thwomp won’t slam again? Check the event that starts the slam and figure out which of the 2 conditions isn’t being met.

i had to add a new condition which was “tween rising on thwomp has finished playing” and the actions are “remove the tween rising from thwomp” “wait 0.4 seconds” “change animation of thwomp set to idle” and then it worked

1 Like