Home   Help Search Login Register  

Author Topic: How do I check if a unit has fired a shot?  (Read 559 times)

0 Members and 1 Guest are viewing this topic.

TerranAce007

  • Guest
How do I check if a unit has fired a shot?
« on: 27 Dec 2002, 08:04:25 »
I'm trying to sound an alarm when a shot is fired, but I'm not sure how to do that. I tried this, but I get an "error unkown operator ammo" message.

-Trigger-
Condition: BulletCount = sniper ammo "SG550mag"; BulletCount < 30;

or

Condition: sniper ammo "SG550mag" < 30;

Activation: Sound Alaram...

The syntax is correct according to the Official Command Ref. manual for OFP 1.85, but I'm using 1.90. Maybe it has been removed?

How else could I sound the alarm when the player shoots? It goes off if he kills someone, but if not, the crowd just looks around, then continues to stand there calmly. I want them to run away!

Offline Black_Feather

  • Former Staff
  • ****
  • I'll never forget you Daisey.
Re:How do I check if a unit has fired a shot?
« Reply #1 on: 27 Dec 2002, 19:58:31 »
sniper ammo "SG550mag" < 30

that should work but make sure you have the magazine name right, if you don't have any luck try this

sniper addEventHandler ["fired",{playSound "alarm"}]