Home   Help Search Login Register  

Author Topic: crouch  (Read 480 times)

0 Members and 1 Guest are viewing this topic.

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
crouch
« on: 25 Feb 2005, 02:02:27 »
hey

how do u get AI to do the exact same position that the player would get if he pressed the "Q" key on the keyboard.

the crouch position where he can still turn and aim and stuff. i want that for AI soldiers

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:crouch
« Reply #1 on: 25 Feb 2005, 02:20:45 »
you can either try

Code: [Select]
loon_name switchmove "CombatToCrouch"
which will play the animation, but won't last very long, or

Code: [Select]
loon_name setbehaviour "combat"
which will let the loon make up its own mind whether or not it wants to go prone, or get down on one knee and propose with bullets (how romantic  :-*) or stay standing....

the simple answer is you can't.

Offline Blanco

  • Former Staff
  • ****
Re:crouch
« Reply #2 on: 25 Feb 2005, 02:48:20 »
Use this :

Code: [Select]
_unit = _this select 0
dostop _unit


#loop
?alive _unit : exit
_unit setbehaviour "combat"
_unit setcombatmode "yellow"
dostop _unit
~1
#getdown
~1
_unit setbehaviour "combat"
~0.1
_unit setunitpos "up"
~2

_unit playmove "combattocrouch"
_unit playmove ""
~ (random 5) + 5
goto "loop"
He will popup once a while.

« Last Edit: 25 Feb 2005, 02:49:05 by Blanco »
Search or search or search before you ask.

dan ick

  • Guest
Re:crouch
« Reply #3 on: 25 Feb 2005, 03:13:35 »
 ;D Hi

           You could also try this in the init field

This setbehaviour "combat";this switchmove "combattocrouch";this setunitpos "up".

I think this is right,if not its jus in a diff order,but they are the 3 commands you will need.

                                 Good Luck ;D

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:crouch
« Reply #4 on: 25 Feb 2005, 08:33:51 »
Should it be:

?!(alive _unit) : exit