pixeltroid
Member
I've been working with a state system for my player.
And I want the player sprite to change to it's shooting animation (spr_heroshoot) when he enters the "shoot state" and then revert back to his normal state and sprite (spr_herostand)
I've got this code in the step event:
And when the shoot button is pressed, it calls scr_playershoot_state and the player shoots just fine. But the problem is that only the first frame of the shoot animation (spr_heroshoot) plays.
Why is this happening? and what should I do?
And I want the player sprite to change to it's shooting animation (spr_heroshoot) when he enters the "shoot state" and then revert back to his normal state and sprite (spr_herostand)
I've got this code in the step event:
Code:
if (state == 'move' && health > 0) {
scr_player_move_state();
sprite_index = spr_herostand
image_speed = .2
}
if state == 'playershoot' {
scr_playershoot_state();
sprite_index = spr_heroshoot
image_speed = .2
}
Why is this happening? and what should I do?
Last edited: