Home   Help Search Login Register  

Author Topic: "throw" action issues  (Read 921 times)

0 Members and 1 Guest are viewing this topic.

Grendel

  • Guest
"throw" action issues
« on: 25 May 2005, 22:50:37 »
ARGHHH!  The action command and its insolent syntax issues >:(

Does anyone know the proper syntax to have a unit throw a normal BIS standard hand grenade?

I have used _unit action ["throw","smokeshell","smokeshell"] to successfully throw smoke, but when I tried to use it to throw a grenade, I have nothing but problems.

I have tried interchanging "handgrenade" and "grenadehand" and when I use the fired eventhandler I got NOID handgrenade (????) and tried using that.

I'm hoping someone has already figured this out so i dont ruin my nice monitor by shoving a brick through it, although I could find no info on it under the sticky topic.

Thanks

-Grendel

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:"throw" action issues
« Reply #1 on: 25 May 2005, 23:00:38 »
I would have thought that:

_unit action ["throw","grenadehand","grenadehand"]

would have worked, as that is the class name for the hand grenade.

Never tried it myself though.



Planck
« Last Edit: 25 May 2005, 23:13:12 by Planck »
I know a little about a lot, and a lot about a little.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:"throw" action issues
« Reply #2 on: 25 May 2005, 23:11:39 »
_unit fire ["throw","handgrenade"]
« Last Edit: 25 May 2005, 23:11:53 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline ACF

  • Members
  • *
  • Llama?? Ain't that French for tanks?
Re:"throw" action issues
« Reply #3 on: 25 May 2005, 23:54:44 »
A curiosity:  the unit Fire weaponnamestring syntax also works if you use:

unit Fire "throw"

This does mean he will chuck smoke grenades as well if he has them.

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:"throw" action issues
« Reply #4 on: 26 May 2005, 10:35:23 »
It will depend which 'throw' magazine is selected.

OFP uses grenades (both fragmentation and smoke) as magazines, and has 'throw' as the weapon. If you had smokeshell selected, he would throw that.

The throw command goes:
Muzzle, Mode, Magazine

However a lot of weapons can be fired by just:
Muzzle, Magazine

So Hater_Kint's solution will get the job done ;)

Grendel

  • Guest
Re:"throw" action issues
« Reply #5 on: 26 May 2005, 17:42:09 »
Thanks for the help everyone...

Just a little intel bit, this helped impliment another inovative addition to OFP...The M86 Pursuit Deterent Munition (it is a real world item BTW-and a nasty little one at that)! As always from me, no separate addons needed, just some little scripts!

thanks again

-grendel