OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Sgt.Zeke on 27 Sep 2003, 07:49:00

Title: Getting unit to kneel....BUT STILL SHOOT!
Post 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
Title: Re:Getting unit to kneel....BUT STILL SHOOT!
Post by: Blitzer on 27 Sep 2003, 08:10:08
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.
Title: Re:Getting unit to kneel....BUT STILL SHOOT!
Post by: KJAM on 27 Sep 2003, 17:05:46
i think he means the AI units warsmith
Title: Re:Getting unit to kneel....BUT STILL SHOOT!
Post by: Sgt.Zeke on 28 Sep 2003, 06:22:36
-oh ya :D

yep i'm taling about the AI ;D
Title: Re:Getting unit to kneel....BUT STILL SHOOT!
Post by: Hawkins on 28 Sep 2003, 10:31:27
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
Title: Re:Getting unit to kneel....BUT STILL SHOOT!
Post by: Unnamed on 28 Sep 2003, 10:41:49
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:

Quote
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.
Title: Re:Getting unit to kneel....BUT STILL SHOOT!
Post by: General Barron on 28 Sep 2003, 20:50:19
Quote
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.
Title: Re:Getting unit to kneel....BUT STILL SHOOT!
Post by: Zayfod on 03 Oct 2003, 04:54:22
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)