I have a custom map where a hero levels up from 1-100 defending against neverending waves of player 12 to ultimately kill a uber unit at the top of the map. Like ENFO TEAMSURVIVAL in WC3.
I am currently setting up teams with a trigger like:
player team setup
Events
Local Variables
Conditions
Actions
UI - Display "team setup ran" for (All players) to Chat area
- get/set player from lobby teams
- team 1
Variable - Set PlayerNumberInt[1] = (Player 1 from (Players on team 1))
Variable - Set PlayerNumberInt[2] = (Player 2 from (Players on team 1))
Variable - Set PlayerNumberInt[3] = (Player 3 from (Players on team 1))
- team 2
Variable - Set PlayerNumberInt[4] = (Player 4 from (Players on team 2))
Variable - Set PlayerNumberInt[5] = (Player 5 from (Players on team 2))
Variable - Set PlayerNumberInt[6] = (Player 6 from (Players on team 2))
- team 3
Variable - Set PlayerNumberInt[12] = (Player 1 from (Players on team 3))
Variable - Set PlayerNumberInt[13] = (Player 2 from (Players on team 3))
- team 4
Variable - Set PlayerNumberInt[0] = (Player 1 from (Players on team 4))
- TEAM 1
Player Group - Add player PlayerNumberInt[1] to TeamGroup[1]
Player Group - Add player PlayerNumberInt[2] to TeamGroup[1]
Player Group - Add player PlayerNumberInt[3] to TeamGroup[1]
- TEAM 2
Player Group - Add player PlayerNumberInt[4] to TeamGroup[2]
Player Group - Add player PlayerNumberInt[5] to TeamGroup[2]
Player Group - Add player PlayerNumberInt[6] to TeamGroup[2]
- TEAM Black Legion
Player Group - Add player PlayerNumberInt[12] to TeamGroup[3]
Player Group - Add player PlayerNumberInt[13] to TeamGroup[3]
- TEAM Neutral
Player Group - Add player PlayerNumberInt[0] to TeamGroup[4]
But I can't seem to get a proper handle on a player. When in a second trigger have a chooser spawn a hero when he enters/leaves a region.
like this:
1 pick hero karass
Events
Unit - Baneling [61.11, 81.16] Enters Region Hero Karass
Local Variables
Conditions
Actions
Unit - Kill (Triggering unit)
Unit - Create 1 Karass for player PlayerNumberInt[1] at Start Player 1 facing hero look at point 1 (No Options)
Variable - Set player[1]hero = (Last created unit)
Camera - Pan the camera for player PlayerNumberInt[1] to Start Player 1 over 4.0 seconds with 0% initial velocity, 50% deceleration, and Do Not ...
Unit Selection - Select (Last created unit) for player PlayerNumberInt[1]
Unit Selection - Add (Last created unit) to control group 1 for player PlayerNumberInt[1]
Unit Selection - Add Merc Compound [16.00, 89.00] to control group 3 for player PlayerNumberInt[1]
The baneling is placed with the unit module as player 1.
But players > 1 doesnt spawn.
And i made it simple by using a trigger for each player and spawn(6 heroes x 6 players = 36triggers) like the one above but (Obviousely) just for player 2 placed baneling.
My Q is is this the right way to get/use players in triggers? I have not setup Advanced Team placement as it gave me even more problems.
Like when i say :
Camera - Pan the camera for player (Number of players in (Players on team 1)) to (Center of start location team2) over 0.0 seconds with Existing Velocity% initial velocity, 0% deceleration, and Do Not use smart panning
it doesnt move the camera for players 2 in team 1 , even though there are only 2 players on team 1and player 1 does move ?
my map is of such nature that teams HAVE to be on lobby teams as there are 2 islands and it will mess everything up if player 4 spawns on player1 island
PLEASE HELP.
For EU servers there is a beta on Tug of War > page 2 > Black Survival to get a better idea of what im talking about.
Lobby teams are a little counter-intuitive. Player numbers will be ALWAYS in order of joining, player 1 will always be the first player, who joined the lobby, independant of his position within the lobby teams.
There is a function called Players on (lobby) Team, which returns a player group with all players of the specified lobby team in the order they appear in the lobby. Use it like this.
Thx for reply, but isn't this what I am allready doing? ^^
Variable - Set PlayerNumberInt[1] = (Player 1 from (Players on team 1))
Variable - Set PlayerNumberInt[2] = (Player 2 from (Players on team 1))
Variable - Set PlayerNumberInt[3] = (Player 3 from (Players on team 1))
ATTACHMENTS
teamSetup.png
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I have a custom map where a hero levels up from 1-100 defending against neverending waves of player 12 to ultimately kill a uber unit at the top of the map. Like ENFO TEAMSURVIVAL in WC3.
I am currently setting up teams with a trigger like: player team setup Events Local Variables Conditions Actions UI - Display "team setup ran" for (All players) to Chat area
-get/set player from lobby teams-team 1 Variable - Set PlayerNumberInt[1] = (Player 1 from (Players on team 1)) Variable - Set PlayerNumberInt[2] = (Player 2 from (Players on team 1)) Variable - Set PlayerNumberInt[3] = (Player 3 from (Players on team 1))-team 2 Variable - Set PlayerNumberInt[4] = (Player 4 from (Players on team 2)) Variable - Set PlayerNumberInt[5] = (Player 5 from (Players on team 2)) Variable - Set PlayerNumberInt[6] = (Player 6 from (Players on team 2))-team 3 Variable - Set PlayerNumberInt[12] = (Player 1 from (Players on team 3)) Variable - Set PlayerNumberInt[13] = (Player 2 from (Players on team 3))-team 4 Variable - Set PlayerNumberInt[0] = (Player 1 from (Players on team 4))-TEAM 1 Player Group - Add player PlayerNumberInt[1] to TeamGroup[1] Player Group - Add player PlayerNumberInt[2] to TeamGroup[1] Player Group - Add player PlayerNumberInt[3] to TeamGroup[1]-TEAM 2 Player Group - Add player PlayerNumberInt[4] to TeamGroup[2] Player Group - Add player PlayerNumberInt[5] to TeamGroup[2] Player Group - Add player PlayerNumberInt[6] to TeamGroup[2]-TEAM Black Legion Player Group - Add player PlayerNumberInt[12] to TeamGroup[3] Player Group - Add player PlayerNumberInt[13] to TeamGroup[3]-TEAM Neutral Player Group - Add player PlayerNumberInt[0] to TeamGroup[4]But I can't seem to get a proper handle on a player. When in a second trigger have a chooser spawn a hero when he enters/leaves a region. like this:
1 pick hero karass Events Unit - Baneling [61.11, 81.16] Enters Region Hero Karass Local Variables Conditions Actions Unit - Kill (Triggering unit) Unit - Create 1 Karass for player PlayerNumberInt[1] at Start Player 1 facing hero look at point 1 (No Options) Variable - Set player[1]hero = (Last created unit) Camera - Pan the camera for player PlayerNumberInt[1] to Start Player 1 over 4.0 seconds with 0% initial velocity, 50% deceleration, and Do Not ... Unit Selection - Select (Last created unit) for player PlayerNumberInt[1] Unit Selection - Add (Last created unit) to control group 1 for player PlayerNumberInt[1] Unit Selection - Add Merc Compound [16.00, 89.00] to control group 3 for player PlayerNumberInt[1]
The baneling is placed with the unit module as player 1. But players > 1 doesnt spawn.
And i made it simple by using a trigger for each player and spawn(6 heroes x 6 players = 36triggers) like the one above but (Obviousely) just for player 2 placed baneling.
My Q is is this the right way to get/use players in triggers? I have not setup Advanced Team placement as it gave me even more problems. Like when i say : Camera - Pan the camera for player (Number of players in (Players on team 1)) to (Center of start location team2) over 0.0 seconds with Existing Velocity% initial velocity, 0% deceleration, and Do Not use smart panning
it doesnt move the camera for players 2 in team 1 , even though there are only 2 players on team 1and player 1 does move ?
my map is of such nature that teams HAVE to be on lobby teams as there are 2 islands and it will mess everything up if player 4 spawns on player1 island
PLEASE HELP. For EU servers there is a beta on Tug of War > page 2 > Black Survival to get a better idea of what im talking about.
Lobby teams are a little counter-intuitive. Player numbers will be ALWAYS in order of joining, player 1 will always be the first player, who joined the lobby, independant of his position within the lobby teams.
There is a function called Players on (lobby) Team, which returns a player group with all players of the specified lobby team in the order they appear in the lobby. Use it like this.
@Kueken531: Go
Thx for reply, but isn't this what I am allready doing? ^^
Variable - Set PlayerNumberInt[1] = (Player 1 from (Players on team 1)) Variable - Set PlayerNumberInt[2] = (Player 2 from (Players on team 1)) Variable - Set PlayerNumberInt[3] = (Player 3 from (Players on team 1))