Random color
Events
Unit - Any Unit Enters Region 001
Local Variables
Conditions
Actions
Unit - Set (Triggering unit) team color to (Current player (Random integer between 0 and 15) color)
Actor - Send actor message (Set Tint Color (Color((Random percent)%, (Random percent)%, (Random percent)%, 100.0%)) with HDR 1.0 over 0.0 seconds) to main actor of unit (Triggering unit)
Edit: You can get more random team colors with a similar actor message
Actor - Send actor message (SetTeamColor (Color((Random percent)%, (Random percent)%, (Random percent)%)) (Color((Random percent)%, (Random percent)%, (Random percent)%))) to main actor of unit (Triggering unit)
thanks, i was thinking about same thing, but how do you get this "random integer" part? WHere is it?
edit: ahhh... "Math" :)
THanks again. Some ideas about toggling between these lets say 13 colors?
edit:
I will be very thankfull if anyone could assist me with mutating that trigger into somehting like that:
Unit - Set (Triggering unit) team color to (Current player (Random integer between 1 and [number of active players]) color)
edit:
will that do?
Unit - Set (Triggering unit) team color to (Current player (Random integer between 1 and (Number of players in (Active Players))) color)
btw what means "active players"? Players that have not been defeated yet? Players that have any uni son map? human players?
edit:
ok, "active players" means players that either user or computer are controlling - if user leaves or player did not had set any kind of controll then player is "inactive" :)
Hmm. you want a trigger that cycle through every player color of active players?
I assume you want it to be on a pr unit basis.
Random color
Events
Unit - Any Unit Enters Region 001
Local Variables
player = 0 <Integer>
Conditions
Actions
Variable - Set player = (Integer((Custom value 0 of (Triggering unit))))
Variable - Set player = ((player + 1) mod (Number of players in (Active Players)))
Unit - Set (Triggering unit) custom value 0 to (Real(player))
Unit - Set (Triggering unit) team color to (Current player (Player (player + 1) from (Active Players)) color)
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
How would such trigger look like?
thanks in advance.
Hmm. do you mean player color or tint color?
Done both here
Random color
Events
Unit - Any Unit Enters Region 001
Local Variables
Conditions
Actions
Unit - Set (Triggering unit) team color to (Current player (Random integer between 0 and 15) color)
Actor - Send actor message (Set Tint Color (Color((Random percent)%, (Random percent)%, (Random percent)%, 100.0%)) with HDR 1.0 over 0.0 seconds) to main actor of unit (Triggering unit)
Edit: You can get more random team colors with a similar actor message
Actor - Send actor message (SetTeamColor (Color((Random percent)%, (Random percent)%, (Random percent)%)) (Color((Random percent)%, (Random percent)%, (Random percent)%))) to main actor of unit (Triggering unit)
@SBeier: Go
thanks, i was thinking about same thing, but how do you get this "random integer" part? WHere is it?
edit: ahhh... "Math" :)
THanks again. Some ideas about toggling between these lets say 13 colors?
edit: I will be very thankfull if anyone could assist me with mutating that trigger into somehting like that:
Unit - Set (Triggering unit) team color to (Current player (Random integer between 1 and [number of active players]) color)
edit:
will that do? Unit - Set (Triggering unit) team color to (Current player (Random integer between 1 and (Number of players in (Active Players))) color)
btw what means "active players"? Players that have not been defeated yet? Players that have any uni son map? human players?
edit: ok, "active players" means players that either user or computer are controlling - if user leaves or player did not had set any kind of controll then player is "inactive" :)
Hmm. you want a trigger that cycle through every player color of active players?
I assume you want it to be on a pr unit basis.
Random color
Events
Unit - Any Unit Enters Region 001
Local Variables
player = 0 <Integer>
Conditions
Actions
Variable - Set player = (Integer((Custom value 0 of (Triggering unit))))
Variable - Set player = ((player + 1) mod (Number of players in (Active Players)))
Unit - Set (Triggering unit) custom value 0 to (Real(player))
Unit - Set (Triggering unit) team color to (Current player (Player (player + 1) from (Active Players)) color)