J
James Lin
Guest
I need help the code does not work for the left animation and the idle animationsif (sign(move_x) = 1)
{
sprite_index = sLeft
image_speed = 1;
last_move = "Left"
}
if (sign(move_x) = -1)
{
sprite_index = sRight
image_speed = 1;
last_move = "Right"
}
if (sign(move_x) and sign(move_y) = 0)
{
if (last_move = "Down") image_index = sDownIdle;
if (last_move = "Up") image_index = sUpIdle;
if (last_move = "Left") image_index = sLeftIdle;
if (last_move = "Right") image_index = sRightIdle;
image_speed = 0;
}
if (sign(move_y) = 1)
{
sprite_index = sUp
image_speed = 1;
last_move = "Up"
}
if (sign(move_y) = -1)
{
sprite_index = sDown
image_speed = 1;
last_move = "Down"
}