I'm trying to make a swap ability, however there are some circumstances that I'm hoping to solve through triggers.
There are invulnerable spots on my map that will only make you invulnerable/vulnerable if you are on a certain team, however with swap you can potenially swap someone into a vulnerable state.
However if you target an ally, you shouldn't have the issue.
So a trigger that I have so far, doesn't really want to work:
EventsUnit-AnyUnitusesRunner-Swap(Ult)atEffect1-Approachstage(Ignoresharedabilities)LocalVariablesConditionsOrConditions(Player(Ownerof(Triggeringunit))isgivingplayer(Ownerof(Triggeringabilitytargetunit))SharedVision)==false((Triggeringunit)isinvulnerable)==false((Triggeringabilitytargetunit)isinvulnerable)==falseActionsUnit-Order(Triggeringunit)to(Stop)(ReplaceExistingOrders)UI-Display"Target or you has to be vulnerable ..."for(Playergroup((Triggeringplayer)))toErrorarea
It will let you swap allies, but not if one of you are invulnerable. The trigger won't ever let you swap an enemy. Beginning to think that something I'm using just isn't very efficient or I'm missing some simple thing.
Alliances are fixed and its vision or enemy. So I figured that would be an ok condition for checking for allies.
It's mainly cuz im not on often anymore, and probably less once DotA2 comes out. :D
However I decided to crack this open again and spent around 30 minutes looking at these 5 lines of code. Finally got a solution though.
EventsUnit-AnyUnitusesRunner-Swap(Ult)atEffect1-Approachstage(Ignoresharedabilities)LocalVariablesConditions(Player(Ownerof(Triggeringunit))isgivingplayer(Ownerof(Triggeringabilitytargetunit))SharedVision)==false((Triggeringunit)isinvulnerable)==true((Triggeringabilitytargetunit)isinvulnerable)==trueActionsUnit-Order(Triggeringunit)to(Stop)(ReplaceExistingOrders)UI-Display"Target or you has to be vulnerable ..."for(Playergroup((Triggeringplayer)))toErrorarea
And i want it to not be able to swap invulnerable enemies, but overlook it if it's allies.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I'm trying to make a swap ability, however there are some circumstances that I'm hoping to solve through triggers.
There are invulnerable spots on my map that will only make you invulnerable/vulnerable if you are on a certain team, however with swap you can potenially swap someone into a vulnerable state.
However if you target an ally, you shouldn't have the issue.
So a trigger that I have so far, doesn't really want to work:
It will let you swap allies, but not if one of you are invulnerable. The trigger won't ever let you swap an enemy. Beginning to think that something I'm using just isn't very efficient or I'm missing some simple thing.
Alliances are fixed and its vision or enemy. So I figured that would be an ok condition for checking for allies.
Kynth why don't I see you in our channel anymore?
Anyway, you're using the wrong condition for enemy checking. Use: Get Relationship Between Players.
@TrueKynth: Go
So is it that you want it to be able to swap an invulnerable enemy but not an invulnerable friendly?
It's mainly cuz im not on often anymore, and probably less once DotA2 comes out. :D
However I decided to crack this open again and spent around 30 minutes looking at these 5 lines of code. Finally got a solution though.
And i want it to not be able to swap invulnerable enemies, but overlook it if it's allies.