OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: penguinman 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
-
you can either try
loon_name switchmove "CombatToCrouch"
which will play the animation, but won't last very long, or
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.
-
Use this :
_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.
-
;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
-
Should it be:
?!(alive _unit) : exit