Home   Help Search Login Register  

Author Topic: Alarms For When Dudes Are Shot At Not Just Noticed Enemy  (Read 801 times)

0 Members and 1 Guest are viewing this topic.

Offline westy159

  • Members
  • *
Ok im a bit of a noob when it comes to this sort of stuff and i have made a mission using some cool snowy islands (where snow is falling from the sky) and snow units at night and you as a black op must do the usual sneak into base and cause hell.

But my alarm trigger which when goes off brings reinforcements and makes all the men go from safe mode to aware and stops them patrolling and makes them hunt you only goes off if the east detects west. So if im hiding and start shooting at the enemy but they dont see me nothing happens and it looks daft.

Can i make a trigger so they all react if they are being shot at and not just if they see you?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Alarms For When Dudes Are Shot At Not Just Noticed Enemy
« Reply #1 on: 01 Dec 2005, 18:33:56 »
Welcome to the forum!

Yes.  

You can do this at several levels of sophistication, depending on your experience and the precise effect that you want.

I'm in a rush so I don't have time to go into details, but while you're waiting for a proper answer head over to the Editors Depot and read up on the count command and eventHandlers.
Plenty of reviewed ArmA missions for you to play

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Alarms For When Dudes Are Shot At Not Just Noticed Enemy
« Reply #2 on: 01 Dec 2005, 19:22:41 »
I think what you need to look at is the {Fired} Event Handler.  If you put one of these on the player (and any of his team) it will run a script as soon as one of you fires.  The script could be clever enough to check where the person that fired is actually located so that it doesn't cause units that are along way away to go into action.

Have a look at:
http://www.ofpec.com/editors/resource_view.php?id=543

Another way to consider is to put a {killed} or a {hit} event handler on each of the soldiers that cause the rest to go to alert when any of them are killed or hit depending on which you choose.  Take care with the {killed} EH though that you check who did the killing.  You don't want your whole army to go on alert just because a stupid driver has run one over.
« Last Edit: 01 Dec 2005, 22:39:23 by THobson »

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Alarms For When Dudes Are Shot At Not Just Noticed Enemy
« Reply #3 on: 01 Dec 2005, 20:50:46 »
I think that the 'hit' eventhandler should be enough to do
that job.

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline 456820

  • Contributing Member
  • **
Re:Alarms For When Dudes Are Shot At Not Just Noticed Enemy
« Reply #4 on: 01 Dec 2005, 21:49:24 »
but many event handlers can cause a lot of lag in missions with a lot going on
but if its a blackop mission i doubt to much will be going on
but still a good idea to remove everyones event handler after the alarm has been raised

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Alarms For When Dudes Are Shot At Not Just Noticed Enemy
« Reply #5 on: 01 Dec 2005, 22:37:10 »
In my experience Event Handlers are a wonderful way to reduce lag.  You just need to be careful that each one doesn't run a complicated script.   That could cause problems.  In this case all he needs to do is use a hit or killed event handler to set a the value of a global variable.

In my recent mission there are about 600 soldiers, almost all have three killed event handlers on them, and quite a lot have four.  Despite that, putting a LAW into a truck full of soldiers has no noticable effect on lag.