Halochief89

Position soldier

10 posts in this topic

How do you make a soldier sit, salute, or any other position (like the modelling like the sit down but still aiming position.) I'd really like to know so I can make a comic with OFP.

Share this post


Link to post
Share on other sites

where do I place it in the advanced option though I've placed

soldier playmove "onchair" everywhere on waypoints to triggers to the soldier himself and nothing

Share this post


Link to post
Share on other sites

Have you tried

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

in the units initialization line?

Note that in your example the unit needs to have the name "soldier". If the unit doesn't have this name, the command doesn't work.

Share this post


Link to post
Share on other sites

The animations don't work from the init lines. Some animations work only with switchMove.

Put this line on the waypoint onActivation and you don't even need to name the unit:

this switchMove "onchair"

Share this post


Link to post
Share on other sites

Below example should get the unit on his knee with the gun at the ready.

What to do:

- Give the soldier a name.

- In the initialisation field of the unit write down:

this setUnitPos "up"; this setBehaviour "combat"

- Place a trigger activated by anybody over the unit.

- In the triggers on activation field put down this:

unit switchmove "CombatToWeapon"

<span style='color:red'>Note: the word unit in above line must be replaced by the name you have given to that 1 unit you placed.</span>

p.s. You could use the COMREF for all the animations m8.

Get it from OFPINFO or OFPEC. You need the downloadable comref not the online one. The downloadable one has the animations list.

Share this post


Link to post
Share on other sites

Finally got it to work but how do you turn the damn AI because they instantly get out of the motion (most anyways) and I want them to continue the animation(loop) or stay stuck like onchair

Share this post


Link to post
Share on other sites

Yeah that's the problem indeed. The unit that does the anim tends to get up as soon as he detects the enemy. I once used a small looping script to counter that. Here's an exanmple:

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

#loop

unit switchmove "CombatToCrouch"

~300

Goto "loop"

First i used the combattoweapon anim as i described in my previous post, then after that i used the above. This example waits 5 minutes (300 seconds) then forces the unit back in anim. But you will have to adjust to own needs. Also you might wanna use a check for when that perticular unit get's killed. Otherwise it will look strange when the unit that's dead get's forced to do a anim. The body of the dead unit will then do some spasm movements every time the script loops if there is no check wink_o.gif

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