• 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!

Legacy GM I can't not make a dash !

L

Loutre

Guest
Hello everyone ! (im french dont judge)
Im beginner on GMS, and i try to make a (invincibility) dodge.
I have been searching for 2 hours, but nothing.
I have 2 sprites of 22 frames (Dodge right/left) very similar to Enter the Gungeon's dodge.
So I would like a dodge, with invincibillity if possible.

Someone can help me ?
 
M

maratae

Guest
Using a state machine, create a state with a timer where your player doesn't get damage and won't respond to inputs.
 
B

Blackened

Guest
Any good tuto for crate a state machine ?
There are a lot of tuts concerning FSM but I am rather partial to @Fel666's tut which utilizes enum quite well.

You may also want to have a look at switch statements too as they can be handy here as well. Good readable code is always best practice.

Do what you can and if you still need help getting over this hurdle, throw your code up here and we'll have a looksee. Easy Peasy!

Hope this helps.
 
Last edited by a moderator:
L

Loutre

Guest
There are a lot of tuts concerning FSM but I am rather partial to @Fel666's tut which utilizes enum quite well.

You may also want to have a look at switch statements too as they can be handy here as well. Good readable code is always best practice.

Do what you can and if you still need help getting over this hurdle, throw your code up here and we'll have a looksee. Easy Peasy!

Hope this helps.
Ty very much !
 
Top