Luke Pierson
Member
Help me please I'm trying to get an object to return to its idle animation after teleporting.
Step event:
Animation End event:
I am completely lost as to why this is not working. It switches to the teleport sprite just fine, teleports just fine, but it won't change back to the regular sprite after the teleport animation plays through all of its images
Step event:
Code:
if position_meeting(Fence.x, Fence.y, Fence) {
sprite_index = spr_cleric_teleport;
}
if sprite_index = spr_cleric_teleport {
if image_index = 5 {
action_move_to(obj_teleport.x, obj_teleport.y);
}
}
Code:
if sprite_index = spr_cleric_teleport {
sprite_index = spr_cleric;
image_speed = .1;
image_index = 0;
}