OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Resources Beta Testing & Submission => Topic started by: Blanco on 14 Mar 2007, 11:32:11

Title: Assignteam, a little tip to missionmakers...
Post by: Blanco on 14 Mar 2007, 11:32:11
Do you think selecting multiple units via the F-keys is bit slow?
Well, most of us know that you can assign units to a subgroup with the command menu via 9 (assign) and one of the available color teams.  "MAIN", "RED", "GREEN", "BLUE" and "YELLOW". "MAIN" is "WHITE" in the game.

It might be useful to know that you can assign teams by scripting aswell.  :)

http://community.bistudio.com/wiki/assignTeam  8)
self-explanary no?
Simply name the units you want to assign to one of the subgroups. You can always use a units array and the foreach command offcourse.


Quote
unitname1 assignteam "RED";unitname2 assignteam "RED";unitname3 assignteam "RED"; 

or

Quote
REDGRP = [unitname1,unitname2,unitname3];{_x assignteam "RED"} foreach REDGRP

All you have to do now is hold the SPACEBAR (quick command system), select "RED" and all these units are selected.  :good:

You can also unassign them again by the unassignteam command

http://community.bistudio.com/wiki/unassignTeam
 




Title: Re: Assignteam, a little tip to missionmakers...
Post by: h- on 14 Mar 2007, 12:26:41
You know, both of those commands are in our 'in-house' comref as well so no need to link to the blasted wiki :angel:

assignteam (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=a#assignTeam)
unassignteam (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=t#unassignTeam)
Title: Re: Assignteam, a little tip to missionmakers...
Post by: Blanco on 14 Mar 2007, 12:32:37
Indeed  :P

But this was the introduction to my autoassign script I'm working on.
I guess I was too exited.  :whistle:
Title: Re: Assignteam, a little tip to missionmakers...
Post by: h- on 14 Mar 2007, 12:51:04
 :D

And thanks bedges, I think I was wearing my head up in my a**..
*sigh* ..forgetting to actually link the said commands..  :goodnight: