S
SquashyShrubs
Guest
//Animations
if (!place_meeting(x, y + 1, oWall))
{
sprite_index = sPlayer_jump
image_speed = 0
if (sign(vsp) > 0) image_index = 1; else image_index = 0;
}
else
{
image_speed = 1;
if (hsp == 0)
{
sprite_index = sPlayer
}
else
{
sprite_index = sPlayer_run
}
}
I am trying to animate my player. When I run the game, it appears to make a "copy" of the player and the copy does the animation.
What am I doing wrong?
if (!place_meeting(x, y + 1, oWall))
{
sprite_index = sPlayer_jump
image_speed = 0
if (sign(vsp) > 0) image_index = 1; else image_index = 0;
}
else
{
image_speed = 1;
if (hsp == 0)
{
sprite_index = sPlayer
}
else
{
sprite_index = sPlayer_run
}
}
I am trying to animate my player. When I run the game, it appears to make a "copy" of the player and the copy does the animation.
What am I doing wrong?