Is there a way to assign teams to "groups" which can be controlled/scripted all at once?
I have 4 players which each are attacked by a large amount of spawning units owned by player PlyrCreeps.
(I use PlyrCreeps because if I try to make a new player, the units simply will not spawn, as if the player doesn't exist. If I got this to work I could just make 4 new enemy players)
Each unit is automatically assigned to a team on spawn with a number and the name of the player which they attack. Example:
Team1_AttacksPlayer1, Team2_AttacksPlayer1, Team3_AttacksPlayer1....
Team1_AttacksPlayer2, Team2_AttacksPlayer2, Team3_AttacksPlayer2.... and so on.
However, I need to assign certain scripts to ALL units/teams attacking a certain player. Of course I can just assign them individually, let's say... I want all units attacking player 3 to suddenly die. But then I'd have to copy-paste the script a million times for each unit and that would take forever. Especially since the scripts I want to run on those teams are quite a few.
I have tried the "Set reference 'Blahblah' to team 'Team1_AttacksPlayer1' ", but apparently that overrides the old team as soon as I assign a new team to the reference.
Any help or suggestions on how to handle this is appreciated
Edited by Jokuc, 09 March 2017 - 04:02 PM.