Home   Help Search Login Register  

Author Topic: Hard Question about setting behaviour of multiple units????  (Read 464 times)

0 Members and 1 Guest are viewing this topic.

MONOLITH

  • Guest
Ok, this is a fairly hard problem, and i have tried for ages to try and figure it out, and i cant, so can anyone help?

The situation is, i am doing a black hawk down scenario, the map will start with a few units guarding a downed black hawk, then the player will come and help via a helo drop. Enemy units  will be surrounding the downed chopper, but i only want the action to start when the player gets there.

I need to know how to set the behaviour of units from careless to aware without having to script each one. I tried putting "thislist" in the trigger but i noticed that this only changes one of the units behaviour. I have units in different groups so i need each unit to change behaviour without having to script each one as follows.

_unit setbehaviour "aware"
for each one.

I also need this script to activate the enemies behaviour who will be surrounding the uh60. I cant group all the units as they need to be independant, so i need a script that will change each units behaviour after  a certain activation has been triggered.

Sorry i cant make my description much clearer but i really need help on this one. I would really appreciate if someone could help me out.

Thanks.

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Hard Question about setting behaviour of multiple units????
« Reply #1 on: 20 Sep 2003, 12:46:33 »
first thing to do is place your selected units in an array and declare the array in the Init.sqs

enemyarray = [e1,e2,e3,e4,e5,e6]
e* being the name you gave to the unit in the units "Name" field


then in your script or your trigger use the following command

{_x Setbehaviour "Aware"} forEach enemyarray

« Last Edit: 20 Sep 2003, 12:47:30 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123