• 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.

[General] Ally System.

Status
Not open for further replies.
Level 19
Joined
Jan 12, 2011
Messages
1,523
Ok so i need a trigger which when the host types -teams
it needs to detect how many players are in the game and then reorder the teams into 2 teams (example there are 12 players, host types -teams and then players sepparate into 6v6), if there are less players (example: 8 players ingame) then it would be a 4v4.

and the trigger needs to disable ally/unally.
 
Level 4
Joined
Aug 5, 2011
Messages
99
  • trigger!!
    • Events
      • Player - Player 1 (Red) types a chat message containing -teams as An exact match
    • Conditions
    • Actions
      • Set numberofplayers = (Number of players in (All players controlled by a User player))
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • For each (Integer A) from 1 to (numberofplayers / 2), do (Actions)
            • Loop - Actions
              • Player - Make (Player((Integer A))) treat (Player((Integer B))) as an Ally with shared vision
          • For each (Integer A) from ((numberofplayers / 2) + 1) to numberofplayers, do (Actions)
            • Loop - Actions
              • Player - Make (Player((Integer A))) treat (Player((Integer B))) as an Ally with shared vision
something like that shud work normally, didnt test it tho
 
Status
Not open for further replies.
Top