C
c2h6.sk8
Guest
Okay so I'll keep this as basic as possible, but I'm trying to animate my player character so that the animation only plays while the character is moving. I have seperate sprites for left, right, up, and down, each with their own animations. I've set each keyboard button to transform the front facing sprite to the proper direction and then move at a speed of 1 as long as the key is pressed. But when I try to add the image_speed function to my code, it either doesn't play the animation at all, or only plays while the instance is not moving. I've tried different scripts, and this is my current for the left button press:
x -= 1
image_speed = 0.2
if speed = 0
{
image_speed = 0;
}
I know this is probably way off but I'm kind of new to the program itself. If someone could help me out, that'd be great. Each directional sprite has a still frame and two movement frames if anyone needs to know.
x -= 1
image_speed = 0.2
if speed = 0
{
image_speed = 0;
}
I know this is probably way off but I'm kind of new to the program itself. If someone could help me out, that'd be great. Each directional sprite has a still frame and two movement frames if anyone needs to know.