OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: burgermann on 13 May 2004, 13:33:52
-
How the heck do I make an AI drop his weapon?.. I'm trying to make this.. erhh.. player-arrest-AI procedure. U guys know the rutine..
"DROP YOUR WEAPON, scumbag."
then "GET DOWN".. and finaly get in the jeep! :P
Problems is I can only get the AI to drop weapons using removeAllWeapons this and my addAction["Drop your weapon", ...], and his piece disappears.
So I want the AI to drop his weapon on the ground, for me (or my trusted deputy), to pick up. ???
-
From sticky post: The time for action has come! (http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=9376;view=all) (Editing: General)
unit action ["Drop Weapon",unit ,0,0,primaryweapon unit]
If they have a secondary weapon (at weapon), put this line too:
unit action ["Drop Weapon",unit ,0,0,secondaryweapon unit]
They could still have weapons like grenades, etc on them after that, after that, you should put:
removeallweapons unit
-
Thanks for tip, works instantly, no more screaming and yelling behind my screen... wonder what the parameters are; action[...0,0,...]