Home   Help Search Login Register  

Author Topic: I have a problem with " Fire" script  (Read 1012 times)

0 Members and 1 Guest are viewing this topic.

Offline hadidez

  • Members
  • *
I have a problem with " Fire" script
« 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

Offline Aldo15

  • OFP-addict
  • Former Staff
  • ****
    • My OFP missions
Re: I have a problem with " Fire" script
« Reply #1 on: 08 Feb 2011, 19:25:15 »
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


#EDIT: No need to quote the entire previous post you're replying to...   h-
« Last Edit: 10 Feb 2011, 09:05:28 by h- »
My OFP stuff
FMF Project by Aldo15. Coming soon.
If in the high school or university, Teachers add a new subject about how to make scripts, missions, for ofp. I'd be number one of my classroom

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re: I have a problem with " Fire" script
« Reply #2 on: 08 Feb 2011, 21:00:24 »
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:

Code: [Select]
soldierOne fire ["throw","HandGrenade","HandGrenade"]
"throw" is the muzzel, "hangrenade" is the mode and "handgrenade" is also the magazine.