SGT Vejito
New Member
- Reaction score
- 9
I'm trying to track down a way to remove an ability from a particular unit I have in a map I am creating.
Basicly here is what I want to happen:
there are 5 units, 4 of them are unit A and the fifth is unit B. Unit B gives an aura that provides 100% evasion for every Unit A until Unit B dies, at which point all Unit A's lose the 100% evasion.
I have coded the 100% evasion into an ability, incase that helps.
One of the problems (maybe) with this code is I only want it to remove the abilities from the unit A's equal to the colour of the Unit B that died, not sure if that changes how to do it or not.
Here is the code I was able to think up, but it's messing somewhere, and I think I know where...
I think it's messing on the tail end of the actions, where I've specified Triggering Unit twice, but I have no idea what else to put in its place, nothing seems to fit properly.
Huge thanks to anyone that can help me riddle this out, if you need any other information I'd be happy to provide what I can find out.
Basicly here is what I want to happen:
there are 5 units, 4 of them are unit A and the fifth is unit B. Unit B gives an aura that provides 100% evasion for every Unit A until Unit B dies, at which point all Unit A's lose the 100% evasion.
I have coded the 100% evasion into an ability, incase that helps.
One of the problems (maybe) with this code is I only want it to remove the abilities from the unit A's equal to the colour of the Unit B that died, not sure if that changes how to do it or not.
Here is the code I was able to think up, but it's messing somewhere, and I think I know where...
Trigger:
- Events
- Unit - A unit Dies
- Conditions
- And - All (Conditions) are true
- (Unit type of (Dying unit) Equal to Unit B
- (RedPlayArea <gen> contains (Dying unit)) Equal to True
- (Owner of (Dying unit)) Equal to Player 12 (Brown)
- Actions
- For each (Integer A) from 1 to 5, do (Unit - Remove Evasion from (Random unit from (Units in RedPlayArea <gen> matching (((Unit-type of (Triggering Unit) Equal to Unit A) and ((Owner of (Triggering unit)) Equal to Player 12 (Brown))))
I think it's messing on the tail end of the actions, where I've specified Triggering Unit twice, but I have no idea what else to put in its place, nothing seems to fit properly.
Huge thanks to anyone that can help me riddle this out, if you need any other information I'd be happy to provide what I can find out.