Jump to content
Sign in to follow this  
nettrucker

How to terminate animation loop?

Recommended Posts

Hi everybody

I got a problem with stopping an animation loop. I searced the forums but all solutions I found in various threats are not giving any results.

I was using following animation loop but can't get it to stop

ap switchMove"AmovPercMstpSrasWrflDnon_AmovPercMstpSsurWnonDnon_forgoten";

I searched also on Ofpec couldn't find a solution though, any suggestions to terminate the loop.

I tried

 unit switchMove "";

it does not work out.

Any help is highly appreciated.

thanks in advance.

regards

nettrucker:confused:

Edited by nettrucker
Tried to cancel double posted by mistake

Share this post


Link to post
Share on other sites

Hello Ghost644

I tried that, but the animation loop won't stop. I'm stuck. I'm wondering what sense have certain animation loops if you can't terminate the animation? I'll have to try to find a work around most probably I can't use the animation I wanted.

thanks anyway for your reply.

regards

nettrucker

Share this post


Link to post
Share on other sites

Did you try using switchmove to another animation, or even playmove?

Share this post


Link to post
Share on other sites
Did you try using switchmove to another animation, or even playmove?

I tried both. In the animation I wanted to use the character put's his hands above his head after dropping his weapon to surrender. I tried unit switchMove "TestSurrender" as a following animation move, but i can't get it to work, the first animation doesn't stop. No matter what I tried so far.

Share this post


Link to post
Share on other sites

This is also something i would like to know.

Im using

_unit playMove "RepairingKneel";
sleep 10;
_unit switchMove "";

it just tries to halt the animation and puts the weapon back infront of me then goes back to repairing :/

EDIT: found a solution moments after post.

if you begin the animation with "switchMove" you can stop it with switchMove ""

but not with any of the others, you dont get the smooth transition but atleast it works

Hopefully helps someone.

Edited by Matte54

Share this post


Link to post
Share on other sites

I'm not sure if this thread applies to my problem but I need an answer nonetheless.

I'm having one hell of a time getting any animation to play on any unit. I'm just trying to get a unit to surrender but no anims play.

I have an Independent unit(which is set to OPFOR friendly) and I have this in his init line:

this switchMove "Surrender"; this PlayMove "Surrender"; removeallWeapons this; this setCaptive true; this setUnitPos "UP"; this disableAI "MOVE";

but nothing happens. The units just stands there. I've tried this:

this switchMove ""; this switchMove "Surrender"; this PlayMove "Surrender"; removeallWeapons this; this setCaptive true; this setUnitPos "UP"; this disableAI "MOVE";

but no luck. I've tried just about everything else but the unit will not play a surrender animation. I've checked different animations in Clayman's AnimView v1.2 but none will play.

Does anyone have any suggestions?

Share this post


Link to post
Share on other sites

Hi Manzilla

for the static surrender scene where the unit has already folded the hands behind the head the anim move should be "TestSurrender"

unitname switchMove "TestSurrender" I have never seen the "Surrender" animmove command. If you can't get it activated in the units init field try with a trigger or otherwise with a camscript.

hope that helps.

kind regards

Share this post


Link to post
Share on other sites
Hi Manzilla

for the static surrender scene where the unit has already folded the hands behind the head the anim move should be "TestSurrender"

unitname switchMove "TestSurrender" I have never seen the "Surrender" animmove command. If you can't get it activated in the units init field try with a trigger or otherwise with a camscript.

hope that helps.

kind regards

I've tried the "TestSurrender" as well. That didn't do it either. I was trying to do it via a trigger but I was having trouble setting that up.

EDIT:

Got it via trigger. Yay!!!

Thanks for the quick response.

Edited by Manzilla

Share this post


Link to post
Share on other sites

Yeah the "RepairingKneel" animation really is strange...

I use this in a repair feature and there simply is no way to stop this animation.

The command playMoveNow will not stop it but in the description it says:

When used on a person,a smooth transition to the given move will be initiated, but all previous playMove are discarded.

Okay the switchMove "...." and switchMove "...." truely works as a workaround but specially the "RepairingKneel" animation looks pretty stupid with this.

I use to simply put the unit in the vehicle which he currently is repairing to stop the animation. :D

@Manzilla

Try this:

Animations used in the init of a unit do not work!

Call a unit a1 for example.

Create a Trigger:

Trigger Condition:

time > 0

Trigger OnActivation:

removeAllWeapons a1; a1 switchMove "AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon";

It's the animation i use for captives.

Edited by SNKMAN

Share this post


Link to post
Share on other sites

Thanks SNKMAN!

I got it working via trigger but for some reason the init line just wanted work. Odd stuff.

Share this post


Link to post
Share on other sites

Well i guess changing animations in the init of a unit do not work becouse the animation ( init line ) will be executed while the unit still is initializing or not already really present in the game.

So in a easy work. The init line of a unit is executed to early to make a unit change it's animation correctly.

Share this post


Link to post
Share on other sites

I Just tested it in the editor and I must admit I'm stunned because it's not working in the units initfield I've tried with this and units variable name I couldn't get it to work. It works in waypoints activation field and with the triggers activationfields though.

I named the unit which should surrender ws1

ws1 switchMove "TESTSURRENDER"

If you use a trigger activation. Condition should be set to true.

I'm really puzzled that the anim commands doesn't seem to work in units init field.

Try for yourself with a waypoint or a trigger and it should work.

regards

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×