Etc.. It works in game. Player 1,2 and 3 changes color at the start. But will this make units that come out of barracks to change the color? Will this leak? How can this trigger be more effective?
Memory leaks are something rare in common languages.
Not so much in Blizzard's scripting languages, though ;) I sense a WC3 veteran.
Fortunately, Galaxy handles memory leaks way better than JASS ever did.
Quote:
How can this trigger be more effective?
As Nerfpl said, this trigger is nothing to worry about at all. It is a one-time action, which only calls a couple of not particularily complicated functions.
If you need to modify more players than 3, you could use a loop to save some time and lines, but thats entirely up to you. Code execution wise, it wouldn't be any different.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Since players will play in 2 teams on my map, I would like to add the same team color to several players.
For example, player 1-8 are blue. Their units and buildings look blue. Player 9-16 are red.
Still each player will only control their own units.
Is this possible to make?
Triggers. Use the "Set Player Color" action
Thank you. But that was really advanced stuff. : /
I made this trigger instead:
Etc.. It works in game. Player 1,2 and 3 changes color at the start. But will this make units that come out of barracks to change the color? Will this leak? How can this trigger be more effective?
Not so much in Blizzard's scripting languages, though ;) I sense a WC3 veteran.
Fortunately, Galaxy handles memory leaks way better than JASS ever did.
As Nerfpl said, this trigger is nothing to worry about at all. It is a one-time action, which only calls a couple of not particularily complicated functions.
If you need to modify more players than 3, you could use a loop to save some time and lines, but thats entirely up to you. Code execution wise, it wouldn't be any different.