OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Sgt.Zeke on 27 Sep 2003, 07:49:00
-
How do you get units to kneel in a combatative stand (where they are kneeling but still keep their rifle up and can still shoot!)?
:-\
-Sgt.Z
-
Giday,
I'm pretty sure that if you were looking through your sight and you laid on the ground then pressed your Pg Up once(to stand up) that you would be kneeling looking through your gun.
-
i think he means the AI units warsmith
-
-oh ya :D
yep i'm taling about the AI ;D
-
From the unofficial comref:
man switchmove "CombatToCrouch"
man is the name of the unit you want to crouch. He will crouch but stand up right away. You could loop this in a script, but that wuld cause him to "flicker". ;D Never really accomplished to get a man crouched. Though, I've never had to do it. ;D
Hawkins
-
There are a three or four ways of doing it, the easiest (but not the most flexible) way I've seen was posted by SkinMez over at the Inv44 forum:
I just type this in the init field:
This DisableAI "Move"; This SetBehaviour "Combat"; This SwitchMove "CombatToCrouch"; This SetUnitPos "Up"
You should be able to place the above code in a trigger aswell.
You can force the same thing with switchmove in a loop, but as Hawkins said. It's a bit dodgy.
-
I just type this in the init field:
This DisableAI "Move"; This SetBehaviour "Combat"; This SwitchMove "CombatToCrouch"; This SetUnitPos "Up"
I also type:
This DisableAI "Target"
In the init field. Otherwise, if you have a group of units they will run out from behind their cover to attack enemies.
-
Or u could try my script that was made for just this purpose ;)
http://www.ofpec.com/yabbse/index.php?board=27;action=display;threadid=11904;start=%200#lastPost
Zay
(http://groups.msn.com/_Secure/0SADKAmcWnz3XumvYaMpSCJ4xGFjLamL205J*YB4hP9!bgmL7kPQwHso*ncYCiiLU0e2u2HGL0*X19modpHX!GTzpk!JNUAlBIGn3v!HBSUwzAAAApHJTAg/AIcover.jpg)