OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: hadidez on 08 Feb 2011, 11:13:46
-
hi. I have a problem with " Fire" script. when i write this script the game say me "fire" operator is unknown. my script is :
s1 fire "handgrenade"
but it is unknown for game.
help me please
-
Perhaps you are writing the script wrong. I've been using this script, but with a differen weapon.
for example:
S1 fire "M16" or "Ak47"
I've been writing this same script, but AI do nothing. see this topic (http://www.ofpec.com/forum/index.php?topic=35489.0)
#EDIT: No need to quote the entire previous post you're replying to... h-
-
The fire command used in the format you are using will only work with the weapon presently equiped. To make a unit fire a weapon in his inventory that is not equiped you have to use the more complex format:
soldierOne fire ["throw","HandGrenade","HandGrenade"]
"throw" is the muzzel, "hangrenade" is the mode and "handgrenade" is also the magazine.