• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

SOLVED Knockback state (DnD) (Need Help)

L

Luke1265

Guest
I am just starting to use game maker. I have created a knockback state (using Drag and drop) in which the character moves into when damage is taken. Hp is set to 5, when damage is taken the correct amount works. Except when the player hits the ground, it doesn't move back into the idle/walk state and continues to 'float' in the air. I have a 'check state' script which runs when vsp is greater than 0, but instead it never changes state. I have attempted to fix this by moving the check state before checking vsp, but this results in no knockback at all.
I have looked over the code for spelling mistakes/any mistakes at all
 

Attachments

Slyddar

Member
The order that code runs is important. The codeblocks are placed that way so the code runs correctly. If you don't place them in the same order as the tutorial, then it won't run the same as the tutorial. The order as per the tutorial is shown below : (reset_input can be ignored, this is added when we add controller support)

1600136401984.png

First thing to do is to try putting them in the same order and see if that solves your problem.
 
Last edited:

Slyddar

Member
Thank you! That fixed it!
Ensure all other states are the correct order too. The order things run is very important. Think of the steps in pouring a drink. Good luck pouring it before you've got a glass and placed it on the counter :)
 
Top