Ability- any unit creates a unit with ability Any or behavior Any
Conditions
(Owner of (Created unit)) == 1
Actions
Unit -Change ownership of (Last created units) to player 0 and Change Color
It doesn't work. ðŸ˜
The idea is, The player controls a single Unit. A stranded hero. The hero has abilities to call down mercenaries. I don't want the player to have control over these mercenaries AND when player 1 hovers over them I want it to display which team they are on.
Player 0 is titled Mercenaries and is allied to Player 1 titled Hero who are both enemies to Player 2 titled Rogue AI.
Right now I have the filters on the 4 units the player "Hires" (with a drop pod animation) set to
-unselectable.
So player 1 hasno control over them, but they are targetable so player 1 can see their health and energy.
But I want the them to change over to player 0 so they display "Mercenaries" under their health and energy as well as change color.
You used last created unit in the action, but it won"t work because it references to the unit that created with triggers, but you want to referenc to a unit that created by ability, so you can put the created unit instead of last created unit like you did in the conditions.
correct trigger:
Events Ability -Any Unit creates a unit with ability Any or behavior No Game Link Local Variables Conditions (Owner of (Created unit)) == 1 Actions Unit -Change ownership of (Created unit) to player 0 and Change Color
This is my trigger:
Event
Ability- any unit creates a unit with ability Any or behavior Any
Conditions
(Owner of (Created unit)) == 1
Actions
Unit -Change ownership of (Last created units) to player 0 and Change Color
It doesn't work. ðŸ˜
The idea is, The player controls a single Unit. A stranded hero. The hero has abilities to call down mercenaries. I don't want the player to have control over these mercenaries AND when player 1 hovers over them I want it to display which team they are on.
Player 0 is titled Mercenaries and is allied to Player 1 titled Hero who are both enemies to Player 2 titled Rogue AI.
Right now I have the filters on the 4 units the player "Hires" (with a drop pod animation) set to
-unselectable.
So player 1 hasno control over them, but they are targetable so player 1 can see their health and energy.
But I want the them to change over to player 0 so they display "Mercenaries" under their health and energy as well as change color.
In reply to oosnowwulfoo:
You used last created unit in the action, but it won"t work because it references to the unit that created with triggers, but you want to referenc to a unit that created by ability, so you can put the created unit instead of last created unit like you did in the conditions.
correct trigger:
Events
Ability -Any Unit creates a unit with ability Any or behavior No Game Link
Local Variables
Conditions
(Owner of (Created unit)) == 1
Actions
Unit -Change ownership of (Created unit) to player 0 and Change Color
In reply to ragadozo88:
Thanks that fixed it
In reply to oosnowwulfoo:
Your welcome :)