Home   Help Search Login Register  

Author Topic: Grenade Stuff  (Read 580 times)

0 Members and 1 Guest are viewing this topic.

m21man

  • Guest
Grenade Stuff
« on: 06 Dec 2003, 23:37:21 »
1. Can you detect the nearest weaponhandler with nearestobject?

2. What would be the most efficient technique for determining the altitude of a hand grenade?

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Grenade Stuff
« Reply #1 on: 07 Dec 2003, 04:25:31 »
1) You mean detect the nearest thrown grenade? Easy--
grenade = nearestobject [unit, "grenadehand"]

2) After naming the grenade like in #1--

getpos grenade select 2
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

m21man

  • Guest
Re:Grenade Stuff
« Reply #2 on: 07 Dec 2003, 06:31:36 »
1. No, I mean when you drop a weapon, you create a weaponhandler. I was wondering if there was a way to search for a hand grenade weaponhandler.

2. I thought that getpos select 2 returned absolute height. I need the relative height above the ground.
« Last Edit: 07 Dec 2003, 06:31:59 by m21man »

Offline Dinger

  • Contributing Member
  • **
  • where's the ultra-theoretical mega-scripting forum
Re:Grenade Stuff
« Reply #3 on: 07 Dec 2003, 07:51:13 »
From Matthijs' post on our dev forum:

The object names are:
WeaponHolder or SecondaryWeaponHolder

My guess is all you need to do is
nearestobject [unit, "WeaponHolder"]

although you could do an X Y Z NO scan and then filter results through "weaponholder" counttype [array]
Dinger/Cfit