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

Attacking When Jump

T

Tari

Guest
I am making a platformer game, but when I finish my attack in the air,my player fall in straight line, different of the normal jump, because my player state changes to attack state!


How do I get my player to continue the normal course?


below are my States of attack, movement and my Vertical collide script.
 

Attachments

D

Danei

Guest
Instead of changing your x and y directly inside the code for the states, you could use the states to set up your movement velocities and put your actual movement code after the state machine, using the velocities determined by the states.
 
Top