Anyone know why this code doesn't work? It would be nice to have a function to switch sides in a team game in case people leave and you want to rebalance a team. Players 10 is just the computer minion spawn on RIGHT SIDE TEAM and player 14 is the one on LEFT SIDE TEAM. Alliance is already setup at game start when players choose a team using dialog buttons. All of that works perfectly, but lets say you want to switch teams with a simple text chat. I tried this, seems like it should work fine as an easy method but it doesn't. Don't know why, nothing happens.
EventsGame-Player1typesachatmessagecontaining"-change team player 1",matchingExactlyLocalVariablesConditionsActionsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If(Player1treatsplayer14asAlly)==TrueThenPlayerGroup-Removeplayer1fromLEFTSIDETEAMPlayerGroup-Addplayer1toRIGHTSIDETEAMUI-Display"Player 1 has been moved to the Righ..."for(Allplayers)toSubtitleareaElseGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If(Player1treatsplayer10asAlly)==TrueThenPlayerGroup-Removeplayer1fromLEFTSIDETEAMPlayerGroup-Addplayer1toRIGHTSIDETEAMUI-Display"Player 1 has been moved to the Righ..."for(Allplayers)toSubtitleareaElse
changing what group they're in doesn't changing their alliance, there's an action called set player alliance. use it in a loop to set the alliances between each player.
Anyone know why this code doesn't work? It would be nice to have a function to switch sides in a team game in case people leave and you want to rebalance a team. Players 10 is just the computer minion spawn on RIGHT SIDE TEAM and player 14 is the one on LEFT SIDE TEAM. Alliance is already setup at game start when players choose a team using dialog buttons. All of that works perfectly, but lets say you want to switch teams with a simple text chat. I tried this, seems like it should work fine as an easy method but it doesn't. Don't know why, nothing happens.
changing what group they're in doesn't changing their alliance, there's an action called set player alliance. use it in a loop to set the alliances between each player.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
DOUGH! Now I remember. I actually have alliance setup in the game this way.... Just a stupid mistake, I forgot teams don't change alliance aspect.
Thanks for the reminder.