Greetings!
I’m new with workshop and i don’t know how to make this script work:
Basically each player in each team can only choose Moira, Doomfist or SIgma. But there must be only 1 sigma per team. So when a player choose Sigma, only Moira and Doomfist could be selected by other players (without limitations, for example 1 sigma and 5 moira or 5 doomfist are allowed). After a player switch off Sigma, any player in the team can choose him (but as always there must be only 1 sigma).
Anyone can help me with this script? i tried a lot of solution but nothing seems work.
THANKS A LOTS for your answer.
Global rule
conditions
Is hero being played(Sigma, team 1)==True
action
Set allowed hereos(team 1, append array(append array(Hero(Doomfist)),Hero(Moira))
Global rule
Condition
Is hero being played(Sigma, team 1)==False
Action
Set allowed hereos(team 1, append array(append array(append array((Hero(Doomfist)), Hero(Moira)), Hero (Sigma))
Do the same for the ennemie team, just be careful I just made this on the fly, find the commands manually and don’t copy it, it’s not from the game
Have fun and a good day!
This first rule would likely change the heroes allowed to Sigma too, so then they would be forced to unselect Sigma, which would then free Sigma up again.
Try this instead.
Ongoing per player
Conditions
If hero of event player == hero (sigma)
Set allowed heroes(filtered array (team of event player, current array element != event player), filtered array(allowed heroes of event player, current array element != Hero(Sigma))
This should work independently of team, and because we used a filtered array, it doesn’t affect the player playing Sigma.
Thanks to all guys! It’s work! You helped me a lot. Really thanks again! Have a nice day!