Overwatch-Script-To-Workshop
Overwatch-Script-To-Workshop copied to clipboard
Unable to set player variable on a filtered array of players
Attempting to set the player variable on a filtered array of players yields the error "No variable by the name of 'variable name' exists in the current scope."
e.g.
playervar Number A;
playervar Number B;
rule: "Example"
{
FilteredArray(AllPlayers(), ArrayElement().A > 5).B = 5;
}
Error: "No variable by the name of 'B' exists in the current scope."
Of course in this example you could set the rule to be OnGoingPlayer, however in a different situation this wouldn't be possible/reasonable.