The point here is what I created the animation, set the animation to the letter e, made the speed and the animation is on the first frame.

Here is the code:

if(keyboard_check_pressed(ord("E"))) { image_index = player_sprite_attack; image_speed = 1; var damage_object = instance_create_depth(x - 0.65, y + 12, 0, object_damage); damage_object.creator = id; } 

    1 answer 1

    Change image_index to sprite_index. Image_index - this is the frame of the sprite, it should not be changed.