I’m Trying to make a Game where there is one person who is randomly chosen as Reaper “Vampire” and I was wondering how to make it a random person from the List of Players in the game?
There is a “randomized value in array” command in the workshop, there is also an “all players” one, with both combined it should help you out
2 Likes
rule("make a player reaper")
{
event {
Ongoing - Global;
}
conditions {
Number of Living Players(All Teams) > 0;
Count Of(Players On Hero(Hero(Reaper), All Teams)) == 0;
}
actions {
Start Forcing Player To Be Hero(
Random Value In Array(All Living Players(All Teams)),
Hero(Reaper)
);
}
}
1 Like
Add the condition number of living players(all teams) > 0
to prevent this rule from being executed instantly.
2 Likes
thanks, i edited my post.
i also happened to be in the workshop already so I just created it there and copy+pasted it. So now you can copy+paste the rule text and put directly into OVerwatch