• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Windows Animation of my character doesn't work properly

Status
Not open for further replies.

Joifad

Member
The code I wrote is exactly like this:

//Update Sprite
function PlayerAnimateSprite(){var _cardinalDirection = round(direction/90);
var _totalFrames = sprite_get_number(sprite_index) / 4;
image_index = localFrame + (_cardinalDirection * _totalFrames);
localFrame += sprite_get_speed(sprite_index) / FRAME_RATE;

//If animation would loop on the next game step
if (localFrame >= _totalFrames)
{
animationEnd = true;
localFrame -= _totalFrames;
}else animationEnd = false;

}

This code I wrote helps my character to move
My character has an animation running up, left, down
but when going to the right the animation does not move the character just slips

 

Attachments

TsukaYuriko

☄️
Forum Staff
Moderator
You already have a topic about this:

One topic per issue, please.
 
Status
Not open for further replies.
Top