Home   Help Search Login Register  

Author Topic: Grenade!  (Read 1201 times)

0 Members and 1 Guest are viewing this topic.

Offline Captain Crunch

  • Members
  • *
Grenade!
« on: 17 Apr 2007, 02:10:28 »
Hi there.

Is it possible to verify if any unit within a trigger just threw a grenade?
Back to the forest!

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Grenade!
« Reply #1 on: 17 Apr 2007, 11:02:13 »
Try this in the trigger's condition (give a name to the trigger and change triggername by that name and change 100 by the trigger's radious).
Code: [Select]
count nearestObjects [getPos triggername select 0, getPos triggername select 1, getPos triggername select 2, ["GrenadeHand"], 100] > 0

Offline Captain Crunch

  • Members
  • *
Re: Grenade!
« Reply #2 on: 17 Apr 2007, 14:34:38 »
Hi Mandoble.

I tried your snippet but I get an error message:

'count l#l NearestObjects [GetPos GrenadeTrig Select...'
Error 5 elements provided, 3 expected

Any other ideas? Thanx again!
Back to the forest!

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Grenade!
« Reply #3 on: 17 Apr 2007, 14:54:30 »
Then try:
Code: [Select]
count (getPos GrenadeTrig nearObjects ["GrenadeHand", 100]) > 0

Offline Captain Crunch

  • Members
  • *
Re: Grenade!
« Reply #4 on: 17 Apr 2007, 15:56:03 »
YES!

This works great! Thank You very much!

Jason
Back to the forest!