Jump to content
Sign in to follow this  
HAILO

How to force swimming animation to stop?

Recommended Posts

Hi,

I am currenty working on some custom respawn scripts and one of the issues I currently have is when a unit is in the water and in the swimming animation. I then move the unit with script to land, however the unit magically swims under the ground or even in the air (depending on the setPos)! rofl.gif

I have found some info in the BIS wiki on animations...

http://community.bistudio.com/wiki/animate

http://community.bistudio.com/wiki/animationPhase

http://community.bistudio.com/wiki/animationState

using the "animationState" command I have tried to find the animation name I want to stop but so far it is reporting different results each time for that.

If you know how to stop the swimming animation and get the unit to act correctly back over the land mass when moving from water to land with a script (I did my tests with a radio trigger), I would appreciate the help.

Thanks in advance smile_o.gif

Share this post


Link to post
Share on other sites

I think I might have found the answer, or perhaps more of a "work around"...

http://community.bistudio.com/wiki/disableAI

http://community.bistudio.com/wiki/enableAI

By using the following code it seems you can stop the animations while you transfer the unit from water to land. You can then enable the animations again on the land.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">soldierOne disableAI "ANIM"

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">soldierOne enableAI "ANIM"

I am still intrested in how to use the "animate" command as I want to play a "medic animation" at a given time. From OFP the animation was "AinvPknlMstpSlayWrflDnon_medic" or "AmovPpneMrunSnonWnonDf" not quite sure which one huh.gif

Share this post


Link to post
Share on other sites

The commands animate and animationPhase deal with a completely different kind of animation, the kind you find on objects (like opening doors, etc...), you want to use switchmove & playmove for soldier animations.

Share this post


Link to post
Share on other sites

Cool, thanks for the pointer mate biggrin_o.gif

Share this post


Link to post
Share on other sites

Try

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">YourUnit switchmove ""

Share this post


Link to post
Share on other sites

Damn, im stuck again LOL

The switchmove command works great on a local lan server but is not playing the animations when I run this on a dedicated server.

Is there something special I need to add ie: gamelogic?

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  

×