Skip to content
Discussion options

You must be logged in to vote

The game already has the code to handle animation swaps in scr_player_animate. Adjust for your needs

        // Handle animation ending
	if ani_get_ended()
	{
		switch animation
		{
			case ANI_BOUNCE: 
			case ANI_BREATHE: 
			case ANI_FLIP:
			case ANI_TRANSFORM: 
				animation = ANI_MOVE;
			break;
			
			case ANI_SKID:
			
				if !input_down.left && !input_down.right || abs(spd_ground) < PARAM_SKID_SPEED_THRESHOLD || !is_grounded
				{
					animation = ANI_MOVE;
				}
				
			break;
		}
	}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by SonicVHSOfficial
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants