Home   Help Search Login Register  

Author Topic: selected units in an array  (Read 445 times)

0 Members and 1 Guest are viewing this topic.

Offline Blanco

  • Former Staff
  • ****
selected units in an array
« on: 18 Oct 2004, 00:37:11 »
Simple question...

Is there a way to know who is (you are the officer offcourse)  selected from a group and put these men in an array?

Search or search or search before you ask.

Kammak

  • Guest
Re:selected units in an array
« Reply #1 on: 18 Oct 2004, 01:02:37 »
The only way I've found is using the onMapSingleClick function, which gives you the _units array of selected units.

To see a working example, check out kmkSquadStuff2, "actBaseOfFireInit2.sqs".

I copy the _units array and store the copy in a global array for later use.

If there is an easier way to get a user-defined unit array, I'd love to know.  I really want script access to the player-defined teams within the group...that would open up lots of possibilities.