Page 1 of 1

How can I pause an animation?

PostPosted: Thu Jun 19, 2008 8:29 pm
by Freddy
Anyone know how I can make an actor pause on the current frame of its animation when colliding with another actor?

Re: How can I pause an animation?

PostPosted: Thu Jun 19, 2008 8:53 pm
by asmodeus
There's a funciton:
ChangeAnimationDirection("Event Actor", STOPPED);

Re: How can I pause an animation?

PostPosted: Thu Jun 19, 2008 9:06 pm
by Freddy
No, I need to have the specific frame, but, thanks anyway.

Re: How can I pause an animation?

PostPosted: Fri Jun 20, 2008 12:53 am
by DXT
MWAHAHAHAHAHA!

When you add that event, choose "wait for frame action" and pick the frame!

MWAHAHAHAHAHA!

Re: How can I pause an animation?

PostPosted: Fri Jun 20, 2008 12:58 am
by feral
if (animpos=6) // which ever frame you want to stop on
{
ChangeAnimation("Event Actor", "animation_name", STOPPED);

}

Re: How can I pause an animation?

PostPosted: Fri Jun 20, 2008 1:04 am
by feral
Freddy wrote:Anyone know how I can make an actor pause on the current frame of its animation when colliding with another actor?


sorry just reread the first post

dxt is right.

on collision event.
select "change animation direction" = stopped
then instead of "immediate action"
choose "wait for frame action"

Re: How can I pause an animation?

PostPosted: Fri Jun 20, 2008 5:25 pm
by Freddy
Thanks, but I need the animation completely stopped when it collides. For ex: if I had an actor with 10 frames, and when it colided with something else, it was on the third frame, I would need the third frame paused. If it was on the 5th frame when it collided, I would need the 5th frame paused, and so on. Any ideas?

Re: How can I pause an animation?

PostPosted: Fri Jun 20, 2008 5:32 pm
by asmodeus
Freddy wrote:Thanks, but I need the animation completely stopped when it collides. For ex: if I had an actor with 10 frames, and when it colided with something else, it was on the third frame, I would need the third frame paused. If it was on the 5th frame when it collided, I would need the 5th frame paused, and so on. Any ideas?

That should work with ChangeAnimationDirection(). When you collide the other Actor and you use that function, it should stop and that animpos, taht it was.

Re: How can I pause an animation?

PostPosted: Fri Jun 20, 2008 6:58 pm
by Freddy
Ah, I see the problem here. I am using the script editor "change animation -> direction stopped" function, instead of the regular "change animation direction -> stopped" function. OK, problem solved, thanks everyone. :D