Hi there. I have 6 times the same trigger for 6 Units which are createt at Game Initialization.
Actor - Send message "SetLocalTintColor {255,255,255 2.000000}" to actor Actor
For some reason, the first 3 units' tint is applied, the remaining 3 units not. I have to add, that the first 3 are controlled by player, the other 3 by computer. What do I have to do for it to work? Or is it a bug?
Here are the actions used by the trigger. The trigger has no local variables, events or conditions and is run by another trigger.
Actor - Send actor message AirTint to main actor of unit Ally1
Actor - Send actor message AirTint to main actor of unit Ally2
Actor - Send actor message AirTint to main actor of unit Ally3
Actor - Send actor message AirTint to main actor of unit Enemy1
Actor - Send actor message AirTint to main actor of unit Enemy2
Actor - Send actor message AirTint to main actor of unit Enemy3
AirTint, Ally1-3 and Enemy1-3 are variables. AirTint is the actor message for the color tint, which I made in order to be able to change the tint by changing only the variable instead of all the 6 actions. The variables of the units are saved directly after creation in another trigger. They definately work, because I use them all the time in other triggers. I also made tests, where i put the actions in an empty trigger, adding a keyboard event. Same outcome. Ally1-3 are tinted, Enemy1-3 not.
The error is likely in one of two places: Either your variables for Enemy1, 2, and 3 are not referencing the units you want to tint or there is something wrong with the actor events you implemented for those unit actors. Alternatively, your units for Enemy1, 2, and 3 might not have the right actor tied to them.
Unit - Create 1 Air Elemental for player 1 at (Center of Ally1) facing 0.0 degrees (No Options)
Variable - Set Ally1 = (Last created unit)
Unit - Create 1 Air Elemental for player 1 at (Center of Ally2) facing 0.0 degrees (No Options)
Variable - Set Ally2 = (Last created unit)
Unit - Create 1 Air Elemental for player 1 at (Center of Ally3) facing 0.0 degrees (No Options)
Variable - Set Ally3 = (Last created unit)
Unit - Create 1 Air Elemental for player 2 at (Center of Enemy1) facing 180.0 degrees (No Options)
Variable - Set Enemy1 = (Last created unit)
Unit - Create 1 Air Elemental for player 2 at (Center of Enemy2) facing 180.0 degrees (No Options)
Variable - Set Enemy2 = (Last created unit)
Unit - Create 1 Air Elemental for player 2 at (Center of Enemy3) facing 180.0 degrees (No Options)
Variable - Set Enemy3 = (Last created unit)
Trigger - Run Units - Set Tint (Ignore Conditions, Don't Wait until it finishes)
This is the trigger, that creates the units and launches the Set Tint Trigger auftwerwars. The Enemies are saved into variables the same way, the Allies are. How could there possibly go something wrong with their actors? The only thing that is different from the allies and enemies, that enemies are facing 180.0 degrees after creation. But that can't be the mistake, can it? I really don't get what is going wrong here.
Edit: The AllyX and EnemyX in "Center of X" are constant unattached regions.
I'm not sure exactly what's wrong but there are a couple of things you can try.
The first is to make player 1 and 2 the same color. When you test the map, make sure your ally color settings show player colors.
The second thing to try is to send a Set Tint actor message directly through your triggers. In other words, instead of using "AirTint," use Set Tint and choose the color, duration and HDR manually.
I thought, this was exactly the purpose of the Set Local Tint Color actor message; to color the actor for one player only. The Set Tint Color would be the message of your choice here.
This local thing seemed indeed to be the mistake. I just thought local meaned the actual unit's it actor was directed to, instead of all units of this type, so i might set units of the same type to a different color. Ok what do the values 'Blend Type' and 'Label' for? They aren't there in the set tint local version.
Blend Type changes the way the tint change behaves. Like if you wanted the color to bounce between the current color and the new color, you would set the Blend Type to Bounce. Label is a marker that you can use to refer to this action later - setting a label is essentially like setting the actor message to a variable.
Hi there. I have 6 times the same trigger for 6 Units which are createt at Game Initialization.
Actor - Send message "SetLocalTintColor {255,255,255 2.000000}" to actor Actor
For some reason, the first 3 units' tint is applied, the remaining 3 units not. I have to add, that the first 3 are controlled by player, the other 3 by computer. What do I have to do for it to work? Or is it a bug?
ty
Shianky
Could you please post the trigger you are using for this?
@BasharTeg: Go
Here are the actions used by the trigger. The trigger has no local variables, events or conditions and is run by another trigger.
Actor - Send actor message AirTint to main actor of unit Ally1
Actor - Send actor message AirTint to main actor of unit Ally2
Actor - Send actor message AirTint to main actor of unit Ally3
Actor - Send actor message AirTint to main actor of unit Enemy1
Actor - Send actor message AirTint to main actor of unit Enemy2
Actor - Send actor message AirTint to main actor of unit Enemy3
AirTint, Ally1-3 and Enemy1-3 are variables. AirTint is the actor message for the color tint, which I made in order to be able to change the tint by changing only the variable instead of all the 6 actions. The variables of the units are saved directly after creation in another trigger. They definately work, because I use them all the time in other triggers. I also made tests, where i put the actions in an empty trigger, adding a keyboard event. Same outcome. Ally1-3 are tinted, Enemy1-3 not.
The error is likely in one of two places: Either your variables for Enemy1, 2, and 3 are not referencing the units you want to tint or there is something wrong with the actor events you implemented for those unit actors. Alternatively, your units for Enemy1, 2, and 3 might not have the right actor tied to them.
@BasharTeg: Go
Unit - Create 1 Air Elemental for player 1 at (Center of Ally1) facing 0.0 degrees (No Options)
Variable - Set Ally1 = (Last created unit)
Unit - Create 1 Air Elemental for player 1 at (Center of Ally2) facing 0.0 degrees (No Options)
Variable - Set Ally2 = (Last created unit)
Unit - Create 1 Air Elemental for player 1 at (Center of Ally3) facing 0.0 degrees (No Options)
Variable - Set Ally3 = (Last created unit)
Unit - Create 1 Air Elemental for player 2 at (Center of Enemy1) facing 180.0 degrees (No Options)
Variable - Set Enemy1 = (Last created unit)
Unit - Create 1 Air Elemental for player 2 at (Center of Enemy2) facing 180.0 degrees (No Options)
Variable - Set Enemy2 = (Last created unit)
Unit - Create 1 Air Elemental for player 2 at (Center of Enemy3) facing 180.0 degrees (No Options)
Variable - Set Enemy3 = (Last created unit)
Trigger - Run Units - Set Tint (Ignore Conditions, Don't Wait until it finishes)
This is the trigger, that creates the units and launches the Set Tint Trigger auftwerwars. The Enemies are saved into variables the same way, the Allies are. How could there possibly go something wrong with their actors? The only thing that is different from the allies and enemies, that enemies are facing 180.0 degrees after creation. But that can't be the mistake, can it? I really don't get what is going wrong here.
Edit: The AllyX and EnemyX in "Center of X" are constant unattached regions.
I'm not sure exactly what's wrong but there are a couple of things you can try.
The first is to make player 1 and 2 the same color. When you test the map, make sure your ally color settings show player colors.
The second thing to try is to send a Set Tint actor message directly through your triggers. In other words, instead of using "AirTint," use Set Tint and choose the color, duration and HDR manually.
I thought, this was exactly the purpose of the Set Local Tint Color actor message; to color the actor for one player only. The Set Tint Color would be the message of your choice here.
@Kueken531: Go
This local thing seemed indeed to be the mistake. I just thought local meaned the actual unit's it actor was directed to, instead of all units of this type, so i might set units of the same type to a different color. Ok what do the values 'Blend Type' and 'Label' for? They aren't there in the set tint local version.
Thank you very much both of you!
Blend Type changes the way the tint change behaves. Like if you wanted the color to bounce between the current color and the new color, you would set the Blend Type to Bounce. Label is a marker that you can use to refer to this action later - setting a label is essentially like setting the actor message to a variable.