Home   Help Search Login Register  

Author Topic: Enemy ALERT script...? HELP!  (Read 450 times)

0 Members and 3 Guests are viewing this topic.

Kilo11

  • Guest
Enemy ALERT script...? HELP!
« on: 28 Jul 2003, 21:36:52 »
Im trying to make a script that once your squad is detected,  an Alarm will play and the enmies behaviour will then be set to "AWARE".  So far, I have a tigger with the following:

-Detected by East
-Condition: None
-On Activation: [man] exec "alarm.sqs"
-Effects: Sounds-Alarm


In the Alarm.sqs file, I need to konw the following:

-Is there anyway to get every enemy unit to the behaviour of "AWARE" in one command, without having to name ever single unit.  (NO: enemy 1 setbehaviour "AWARE"; Enemy 2 setbehaviour "AWARE"; Enemy 3 so on so on  /YES: enemy setbehaviour "AWARE")    Get the point?

Other then that, I need no help.  So basically this is what happens:

1.  I am detected by an East enemy unit.
2.  The alarm plays.
3.  Script it activated.
4.  All enemy units are now alerted, and in "AWARE" behavhoiur mode.

Thank you for any help given.  Cheers.


-=Kilo=-
« Last Edit: 28 Jul 2003, 21:38:44 by Kilo11 »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Enemy ALERT script...? HELP!
« Reply #1 on: 28 Jul 2003, 22:38:52 »
Syntax not guaranteed, but something like

On activation:    "_x setbehaviour {aware}" foreach thislist
Plenty of reviewed ArmA missions for you to play

Kilo11

  • Guest
Re:Enemy ALERT script...? HELP!
« Reply #2 on: 29 Jul 2003, 00:07:09 »
Its ok, I just bade a script that had each units name in it.  Took me 1 hour to make but o well lol.  THanks anyways.

-=Kilo=-

deaddog

  • Guest
Re:Enemy ALERT script...? HELP!
« Reply #3 on: 29 Jul 2003, 06:03:50 »
You don't have to set every unit individually.  The "setbehaviour" command works with groups also:

groupname setbehaviour "aware"

This will set the behaviour of every member in the group without having to name all of them.

Another way would be to populate an array with all of the east units at the beginning of the mission (to expand on what macguba said):  

Place an "east present" trigger that covers the whole map
condition: this
on activation:  eastunits = +thislist

if you want to change all of the east units behaviour later in the mission, then do this:

{_x setbehaviour "aware"} foreach eastunits