Jump to content
Sign in to follow this  
gizz46

help with groupselectunit

Recommended Posts

Hi there :),

Im working on a short Script for a dialog button. With this script I want to select all unit from a specific Team, like team BLUE or so.

i found on Bis Wiki a command to select all units.

{player groupSelectUnit [_x, true];} forEach units group player;

this works good so far. But know i want to select only the unitmembers of team BLUE.

on the Bis Wiki o found this

Returns the team the unit belongs to. Possible values:

MAIN (default and white)

RED

GREEN

BLUE

YELLOW

_team = assignedTeam player;

but i dont realy know how to us this.

Im a novice in scripting and tried for days around how to use it. searched in various forum and so on.

so please help me if you can

Share this post


Link to post
Share on other sites

ok no further help needed found it out by my self.

{if (assignedTeam _x == "RED") then { player groupSelectUnit [_x, true]};} forEach units player;

this helped me out

thanks :)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×