Jump to content

Photo
- - - - -

Position soldier


  • Please log in to reply
9 replies to this topic

#1 Halochief89

Halochief89

    Gunnery Sergeant

  • Members
  • 420 posts

Posted 08 December 2007 - 05:16 AM

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.

#2 -ASA-ODEN

-ASA-ODEN

    Staff Sergeant

  • Members
  • 396 posts

Posted 08 December 2007 - 07:06 PM

Person playMove "moveName"

http://community.bis...m/wiki/playMove

#3 Halochief89

Halochief89

    Gunnery Sergeant

  • Members
  • 420 posts

Posted 08 December 2007 - 10:03 PM

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

#4 W0lle

W0lle

    Lieutenant Colonel

  • Members
  • 8235 posts

Posted 08 December 2007 - 10:08 PM

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"[/QUOTE]

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.

#5 Halochief89

Halochief89

    Gunnery Sergeant

  • Members
  • 420 posts

Posted 08 December 2007 - 10:47 PM

yeah I put rifleman and that didnt do it either

#6 Pulverizer

Pulverizer

    Master Gunnery Sergeant

  • Members
  • 1240 posts

Posted 09 December 2007 - 02:36 PM

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"

#7 Halochief89

Halochief89

    Gunnery Sergeant

  • Members
  • 420 posts

Posted 09 December 2007 - 06:47 PM

did and that didnt work all it said was unknown operator

#8 Warrior X™

Warrior X™

    Master Sergeant

  • Members
  • 706 posts

Posted 10 December 2007 - 01:25 PM

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.
Posted ImagePosted ImagePosted ImagePosted Image Posted Image

#9 Halochief89

Halochief89

    Gunnery Sergeant

  • Members
  • 420 posts

Posted 24 December 2007 - 02:10 AM

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

#10 Warrior X™

Warrior X™

    Master Sergeant

  • Members
  • 706 posts

Posted 24 December 2007 - 06:39 PM

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"
[/QUOTE]

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 Posted Image




Posted ImagePosted ImagePosted ImagePosted Image Posted Image