Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: Grenade!  (Read 1815 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!