Ok, I realize this has been done to death, but I have looked over everything I can find on player teams and lobby setup and I simply cannot get it to work for my map. I cannot make it so regardless of join order, the player in slot 1 of team 1 lobby = player 1 for triggers.
The design of my map is such that, each team corresponds to a specific lane with pre placed buildings that heal the hero or are requirements to win the game.
I'm thinking it may be possible to change up my triggers overall to compensate for the use of variable so I can use one of the other methods described on the forums, but I am terrible with triggers and my usual fumblefart trial and error method would take me years to find out how to make this work.
====So,thisismyCharacterSelectionTrigger:====CharacterSelectionEventsDialog-AnyDialogItemisusedbyPlayerAnyPlayerwitheventtypeClickedLocalVariablesConditionsActionsGeneral-Switch(Actions)dependingon(Useddialogitem)CasesGeneral-If(SelectAldris)ActionsDialog-DisableSelectAldrisfor(Allplayers)General-Wait0.0825RealTimesecondsUnit-Create1Hero-Aldrisforplayer(Triggeringplayer)atPlayerSpawn[(Triggeringplayer)]facing270.0degrees(NoOptions)Variable-SetPlayerUnit[(Triggeringplayer)]=(Lastcreatedunit)Variable-SetPlayerSpawnUnit[(Triggeringplayer)]=Hero-AldrisVariable-SetSelectDone[(Triggeringplayer)]=trueUnitSelection-SelectPlayerUnit[(Triggeringplayer)]forplayer(Triggeringplayer)Dialog-HideCharacterSelectionfor(Playergroup((Triggeringplayer)))====AndthisismyWinTrigger====Team1WinEventsUnit-Base-EnemyBase[62.50,198.50]diesLocalVariablesConditionsActionsTransmission-Sendtransmissionto(Allplayers)from(PlayerUnit[(Ownerof(Killingunit))]withFlash(DoNotoverrideportrait)playingTalk)playingNoSoundLinkwithname(Nameofplayer(Ownerof(Killingunit)))andmessage"Lane 2 has been conquered!"using(CinematicportraitatCenterLeft)playingTalk(Add2.0seconds,Don't Wait until it finishes)General-Wait5.0GameTimesecondsGame-EndgameinVictoryforplayer1(Showdialogs,Showscorescreen)Game-EndgameinVictoryforplayer2(Showdialogs,Showscorescreen)Game-EndgameinDefeatforplayer3(Showdialogs,Showscorescreen)Game-EndgameinDefeatforplayer4(Showdialogs,Showscorescreen)Game-EndgameinDefeatforplayer5(Showdialogs,Showscorescreen)Game-EndgameinDefeatforplayer6(Showdialogs,Showscorescreen)====LossTrigger====Player1LossEventsUnit-AnyUnitdiesLocalVariablesConditionsOrConditions(Triggeringunit)==PlayerUnit[1](Triggeringunit)==Base-RegenerationChamber[62.04,11.52]ActionsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)IfAndConditions(Base-RegenerationChamber[62.04,11.52]isalive)==false(PlayerUnit[1]isalive)==falseThenGame-EndgameinDefeatforplayer1(Showdialogs,Showscorescreen)ElseTrigger-RunPlayer1Respawn(CheckConditions,Don't Wait until it finishes)====Respawn====Player1RespawnEventsLocalVariablesConditionsAndConditions(PlayerUnit[1]isalive)==false(Base-RegenerationChamber[62.04,11.52]isalive)==trueActionsPlayer-Modifyplayer1Minerals:SetTo0Timer-StartPlayerRespawnTimer[1]asaOneShottimerthatwillexpirein10.0GameTimesecondsTimer-Createatimerwindowfor(Laststartedtimer),withthetitle"P1 Respawns in: ",usingRemainingtime(initiallyVisible)Timer-Show(Lastcreatedtimerwindow)for(Allplayers)General-Wait2.0GameTimesecondsCamera-Panthecameraforplayer1toTeam1Spawnover0.0secondswithExistingVelocity%initialvelocity,10%deceleration,andDoNotusesmartpanningUnit-MovePlayerUnit[1]instantlytoTeam1Spawn(NoBlend)General-WaitforPlayerRespawnTimer[1]tohave0.0secondsRemainingUnit-RevivePlayerUnit[1]Unit-SetPlayerUnit[1]Lifeto500.0
My problem seems to lie in that I use triggering player to set the Player[Unit] but I have to use integers to call the specific players.
I would do unmentionable things if someone could help me figure this out.
does the trick, everyting else should be fine with [triggering player]
do yo a respawn action instead of a trigger. store the regeneration chambers in an array too and access it like the points. you only need one player x respawn action then with the playernumber as parameter
I set up the Player Spawn array and set it to points as you show. I have a melee ini trigger that moves the camera for player on team x to a specific point. this works properly for the teams.
Unfortunately, no character and no regen chamber is created when I select my unit. The dialog is hidden so I'm sure the trigger is firing. That combined with the cameras being in the right spot, I'm thinking the point just isn't being recognized and so there is no where to create the unit. I think the issue is, teams are recognized but "Player x on team y" is not.
I do also get an error: gt SetPlayer Function Negative Indexes not supported
I'm not sure if this has to do with there being no players on the other teams or what.
====Thisworks====PlayerGroup-Pickeachplayerin(Playersonteam1)anddo(Actions)ActionsCamera-Panthecameraforplayer(Pickedplayer)toTeam1Spawnover0.0secondswithExistingVelocity%initialvelocity,10%deceleration,andDoNotusesmartpanningPlayerGroup-Pickeachplayerin(Playersonteam2)anddo(Actions)ActionsCamera-Panthecameraforplayer(Pickedplayer)toTeam2Spawnover0.0secondswithExistingVelocity%initialvelocity,10%deceleration,andDoNotusesmartpanningPlayerGroup-Pickeachplayerin(Playersonteam3)anddo(Actions)ActionsCamera-Panthecameraforplayer(Pickedplayer)toTeam3Spawnover0.0secondswithExistingVelocity%initialvelocity,10%deceleration,andDoNotusesmartpanning====Idon't believe this does ====SetPlayerEventsGame-MapinitializationLocalVariablesConditionsActionsVariable-SetPlayerSpawn[(Player1from(Playersonteam1))]=Player1SpawnVariable-SetPlayerSpawn[(Player2from(Playersonteam1))]=Player2SpawnVariable-SetPlayerSpawn[(Player1from(Playersonteam2))]=Player3SpawnVariable-SetPlayerSpawn[(Player2from(Playersonteam2))]=Player4SpawnVariable-SetPlayerSpawn[(Player1from(Playersonteam3))]=Player5SpawnVariable-SetPlayerSpawn[(Player2from(Playersonteam3))]=Player6Spawn====Hereisthecharacterselecttriggeragainmodifiedforthesevariables====CharacterSelectionEventsDialog-AnyDialogItemisusedbyPlayerAnyPlayerwitheventtypeClickedLocalVariablesConditionsActionsPlayer-Modifyplayer(Triggeringplayer)Minerals:SetTo50Unit-Create1Base-RegenerationChamberforplayer(Triggeringplayer)atPlayerSpawn[(Triggeringplayer)]facing270.0degrees(NoOptions)Variable-SetPlayerRegenChamber[(Triggeringplayer)]=(Lastcreatedunit)General-Switch(Actions)dependingon(Useddialogitem)CasesGeneral-If(SelectAldris)ActionsDialog-DisableSelectAldrisfor(Allplayers)General-Wait0.0825RealTimesecondsUnit-Create1Hero-Aldrisforplayer(Triggeringplayer)atPlayerSpawn[(Triggeringplayer)]facing270.0degrees(NoOptions)Variable-SetPlayerUnit[(Triggeringplayer)]=(Lastcreatedunit)Variable-SetPlayerSpawnUnit[(Triggeringplayer)]=Hero-AldrisVariable-SetSelectDone[(Triggeringplayer)]=trueUnitSelection-SelectPlayerUnit[(Triggeringplayer)]forplayer(Triggeringplayer)Dialog-HideCharacterSelectionfor(Playergroup((Triggeringplayer)))
I removed the wait trigger and no change. The wait is required or a player can spam click and get more than one hero.
The error occurs right at melee ini on the Set Player trigger according to the error messages with negative values not supported. I also have my creep wave spawn triggers set to:
Or
Conditions
(Player Regen Chamber[(Player 1 from (Players on team 1))] is alive) == true
(Player Regen Chamber[(Player 2 from (Players on team 1))] is alive) == true
This trigger fails as well when there is no one on team 2 or 3. Due to the error message and it not working for 2 triggers It seems to me that "Player 1 from (Players on Team 2)" is not recognized. I'm beginning to feel that it just doesn't work. Has anyone been able to confirm that it does?
I'm also not very clear on what to do with debug messages that could help.
Ok, I realize this has been done to death, but I have looked over everything I can find on player teams and lobby setup and I simply cannot get it to work for my map. I cannot make it so regardless of join order, the player in slot 1 of team 1 lobby = player 1 for triggers.
The design of my map is such that, each team corresponds to a specific lane with pre placed buildings that heal the hero or are requirements to win the game.
I'm thinking it may be possible to change up my triggers overall to compensate for the use of variable so I can use one of the other methods described on the forums, but I am terrible with triggers and my usual fumblefart trial and error method would take me years to find out how to make this work.
My problem seems to lie in that I use triggering player to set the Player[Unit] but I have to use integers to call the specific players.
I would do unmentionable things if someone could help me figure this out.
does the trick, everyting else should be fine with [triggering player]
do yo a respawn action instead of a trigger. store the regeneration chambers in an array too and access it like the points. you only need one player x respawn action then with the playernumber as parameter
Sadly, no dice.
I set up the Player Spawn array and set it to points as you show. I have a melee ini trigger that moves the camera for player on team x to a specific point. this works properly for the teams.
Unfortunately, no character and no regen chamber is created when I select my unit. The dialog is hidden so I'm sure the trigger is firing. That combined with the cameras being in the right spot, I'm thinking the point just isn't being recognized and so there is no where to create the unit. I think the issue is, teams are recognized but "Player x on team y" is not.
I do also get an error: gt SetPlayer Function Negative Indexes not supported
I'm not sure if this has to do with there being no players on the other teams or what.
remove General - Wait 0.0825 Real Time seconds and try again
where does the error occure? add debug messages
I removed the wait trigger and no change. The wait is required or a player can spam click and get more than one hero.
The error occurs right at melee ini on the Set Player trigger according to the error messages with negative values not supported. I also have my creep wave spawn triggers set to:
Or Conditions (Player Regen Chamber[(Player 1 from (Players on team 1))] is alive) == true (Player Regen Chamber[(Player 2 from (Players on team 1))] is alive) == true
This trigger fails as well when there is no one on team 2 or 3. Due to the error message and it not working for 2 triggers It seems to me that "Player 1 from (Players on Team 2)" is not recognized. I'm beginning to feel that it just doesn't work. Has anyone been able to confirm that it does?
I'm also not very clear on what to do with debug messages that could help.
try player unused condition instead of alive.
Coming on my weekend, I'll give this a try tomorrow hopefully.