I just have no idea why it is that, when a player destroys the enemy's capital, that the game thinks that is player 0 (neutral) who is doing this, rather than the player who owns the attacking unit.
Really need some help with this, maybe you will be able to see where the error is, because I can't.
Also - the idea behind this trigger is that you absorb enemy players into an empire just like in "Empires and Conquest".
EventsUnit-AnyUnitdiesLocalVariablesConditionsAndConditionsOrConditions(Unittypeof(Triggeringunit))==E&N-Building-Capital(Unittypeof(Triggeringunit))==E&N-Building-Capital(Protoss)NotConditions(Ownerof(Triggeringunit))==(Ownerof(AttackingUnit))ActionsUnit-Create1(Unittypeof(Triggeringunit))forplayer(Ownerof(Triggeringunit))at(Positionof(Triggeringunit))facing270.0degrees(NoOptions)UI-Display(Combine((((Text(Nameofplayer(Ownerof(AttackingUnit)))withcolor(Color((Currentplayer(Ownerof(AttackingUnit))color))))+" has conquered ")+(Text(Nameofplayer(Ownerof(Triggeringunit)))withcolor(Color((Currentplayer(Ownerof(for(Allplayers)toSubtitleareaPlayer-Setplayer(Ownerof(Triggeringunit))colorto(Currentplayer(Ownerof(AttackingUnit))color)(Changethecolorofexistingunits)PlayerGroup-Pickeachplayerin(Allplayers)anddo(Actions)ActionsPlayer-Makeplayer(Ownerof(Triggeringunit))andplayer(Pickedplayer)treateachotherasEnemyPlayer-Makeplayer(Ownerof(Triggeringunit))andplayer(Ownerof(AttackingUnit))treateachotherasAllyWithSharedVisionAndPushablePlayerGroup-Pickeachplayerin(Alliesofplayer(Ownerof(AttackingUnit)))anddo(Actions)ActionsPlayer-Makeplayer(Ownerof(Triggeringunit))andplayer(Pickedplayer)treateachotherasAllyWithSharedVisionAndPushable
"Triggering unit" in this case = dying unit. It's in the description of event. Use "Killing unit" And if you mean that "Attacking Unit" i doubt this works as it's for "Unit is attacked" event
Anyway next time please point more clearly what from all of this works incorrectly. Triggers do not 'return' anything
"Triggering unit" in this case = dying unit. It's in the description of event. Use "Killing unit"
And if you mean that "Attacking Unit" i doubt this works as it's for "Unit is attacked" event
Anyway next time please point more clearly what from all of this works incorrectly. Triggers do not 'return' anything
Of course. Thanks. I had edited this trigger from a previous one, where the unit was attacked at a certain health, and THEN captured.
tested and it works now
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I just have no idea why it is that, when a player destroys the enemy's capital, that the game thinks that is player 0 (neutral) who is doing this, rather than the player who owns the attacking unit. Really need some help with this, maybe you will be able to see where the error is, because I can't. Also - the idea behind this trigger is that you absorb enemy players into an empire just like in "Empires and Conquest".
"Triggering unit" in this case = dying unit. It's in the description of event. Use "Killing unit"
And if you mean that "Attacking Unit" i doubt this works as it's for "Unit is attacked" event
Anyway next time please point more clearly what from all of this works incorrectly. Triggers do not 'return' anything
Of course. Thanks. I had edited this trigger from a previous one, where the unit was attacked at a certain health, and THEN captured.
tested and it works now