Results 1 to 10 of 10

Thread: Position soldier

  1. #1
    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. #2

  3. #3
    Gunnery Sergeant Halochief89's Avatar
    Join Date
    May 22 2007
    Location
    Spokane
    Posts
    420
    Author of the Thread
    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. #4
    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 &#34;onchair&#34;[/QUOTE]

    in the units initialization line?

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

  5. #5
    Gunnery Sergeant Halochief89's Avatar
    Join Date
    May 22 2007
    Location
    Spokane
    Posts
    420
    Author of the Thread
    yeah I put rifleman and that didnt do it either

  6. #6
    The animations don&#39;t work from the init lines. Some animations work only with switchMove.

    Put this line on the waypoint onActivation and you don&#39;t even need to name the unit:
    this switchMove "onchair"

  7. #7
    Gunnery Sergeant Halochief89's Avatar
    Join Date
    May 22 2007
    Location
    Spokane
    Posts
    420
    Author of the Thread
    did and that didnt work all it said was unknown operator

  8. #8
    Master Sergeant Warrior X™'s Avatar
    Join Date
    May 15 2003
    Location
    Holland - Rotterdam
    Posts
    706
    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.

  9. #9
    Gunnery Sergeant Halochief89's Avatar
    Join Date
    May 22 2007
    Location
    Spokane
    Posts
    420
    Author of the Thread
    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. #10
    Master Sergeant Warrior X™'s Avatar
    Join Date
    May 15 2003
    Location
    Holland - Rotterdam
    Posts
    706
    Yeah that&#39;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&#39;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 &#34;CombatToCrouch&#34;
    ~300
    Goto &#34;loop&#34;
    [/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&#39;s killed. Otherwise it will look strange when the unit that&#39;s dead get&#39;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




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •