F
fxokz
Guest
In my script my goal is to make it so that after the player has finished his melee animation it goes back to his normal state. The problem is after the first frame of the attack animation it goes back to his normal state.
scr_player_melee
im not sure on how to solve this. the tutorial i watched didnt use scripts (shaunjs tutorial)
scr_player_melee
Code:
hsp = 0;
vsp = 0;
sprite_index = spr_player_melee;
image_speed = 0.2;
if (image_index >=1) && (image_index <=3)
{
with (instance_create(x, y, obj_hitbox))
{
image_xscale = other.image_xscale
with (instance_place(x, y, par_enemy))
{
if (hit == false)
{
hit = true;
// insert whatever
}
}
}
}
state = playerState.normal;
collision_check();