Home   Help Search Login Register  

Author Topic: trigger 2 detect out of ammo  (Read 897 times)

0 Members and 1 Guest are viewing this topic.

Foo

  • Guest
trigger 2 detect out of ammo
« on: 27 Nov 2002, 18:38:51 »
I want a trigger that detects when player is out of ammo completely, so i can end the mission...its a shooting range, so i want it to end when the player runs out.....

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re:trigger 2 detect out of ammo
« Reply #1 on: 27 Nov 2002, 19:04:00 »
that's easily done, put this in the condition field of the trigger:

nameOfUnit ammo "Weapon" == 0

nameOfUnit is, as you've surmised, the name of the unit in question ;) ammo is the command which returns the number of bullets left in the magazine. "Weapon" is the name of the weapon being used, for instance "M16" or "Ak74" (full list available in the Editors Depot/Tutorials/Weapons, command and object lists section ;)). The == 0 means the trigger won't fire 'til there're 0 bullets left in the clip ;)

If, however, you're going on the multiple magazine thing...i.e only stop when you've got NO ammo (as in you've got more than one magazine) whatsoever left...well, that can be done too...I'll even tell you, but only if you that's what you need ::)

/wasting space

g'luck! :)

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Foo

  • Guest
Re:trigger 2 detect out of ammo
« Reply #2 on: 27 Nov 2002, 19:26:48 »
Ya, wat i mean is that after firing all 3 clips im giving the player, it will end.......

Foo

  • Guest
Re:trigger 2 detect out of ammo
« Reply #3 on: 28 Nov 2002, 18:05:07 »
PLZ help me....wolfrug, i need it to respond when COMPLETELY out of ammo, all 3 mags gone!!!!!1

Bremmer

  • Guest
Re:trigger 2 detect out of ammo
« Reply #4 on: 29 Nov 2002, 10:54:22 »
Hello Foo

You could try the someammo command. eg:

someAmmo player

It will be true when the player still has a partial magazine, or any spare clips, and become false when totally out of ammo. So your trigger might be something like:

condition: not someammo player
On Activation: hint "Out of ammo!"

Cheers

Foo

  • Guest
Re:trigger 2 detect out of ammo
« Reply #5 on: 29 Nov 2002, 13:29:04 »
Thanking you...this is the last thing i need 2 complete my mission, so thank god i finally got it! ;D