• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Team management

Status
Not open for further replies.
Level 1
Joined
Aug 30, 2011
Messages
3
For the team how do i make player 1,2,3,4 into a team? Also hOw do i make 1command center that player 1,2,3,4 all use? And i want barracks too
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,259
For the team how do i make player 1,2,3,4 into a team?
Eithor under game varients for in the lobby or use triggers to force various diplomatic states between players.

Also hOw do i make 1command center that player 1,2,3,4 all use? And i want barracks too
Currently I am not aware of any shop like ability in SC2 (the one that allowed you to use a unit when near it in WC3). You can however use the fail safe method of just making a dedicated player for those buildings and giving the humans control. Units that you do not want controled but do wanted owned by that player can be made unselectable (like interceptors).
 
All add the players you want to be on one team to a player group. E.g. make a custom script than:

JASS:
while(lv_i <= 4) {
    PlayerGroupAdd(gv_team1, lv_i);
    lv_i += 1;
}

Then you just use this line to make all the players in that group allied + able to push each others units around. (You can set them to other things like neutral, enemy, etc. by changing that number "2" to the right field).
JASS:
libNtve_gf_SetPlayerGroupAlliance(gv_team1, 2);

The native in turn does this:

  • Set Alliance For Player Group
    • Options: Action
    • Return Type: (None)
    • Parameters
      • Players <Player Group>
      • Alliance Setting = Ally With Shared Vision <Alliance Setting>
    • Grammar Text: Make all players in Player Group treat each other as Alliance Setting
    • Hint Text: Changes alliance settings for all players in the player group. Each player applies the requested alliance setting to every other player in the player group. Pushable means that one player's units...
    • Custom Script Code
    • Local Variables
      • Player1 = 0 <Integer>
      • Player2 = 0 <Integer>
    • Actions
      • Player Group - For each player Player1 in Players do (Actions)
        • Actions
          • Player Group - For each player Player2 in Players do (Actions)
            • Actions
              • General - If (Conditions) then do (Actions) else do (Actions)
                • If
                  • Player1 != Player2
                • Then
                  • ------- Use one way alliance setting here
                  • Player - Make player Player1 treat player Player2 as Alliance Setting
                • Else
This should be useful too:
JASS:
const int c_playerGroupAlly     = 0;    // Allied players of the given player
const int c_playerGroupEnemy    = 1;    // Enemy players of the given player
const int c_playerGroupAny      = 2;    // Any player.
 
Status
Not open for further replies.
Top