Events: Unit - A unit owned by player 1 (red) starts the effect of an ability Conditions: Events: If (All conditions are true) then do (Then Actions) else do (Else actions) 'IF'-Conditions (Ability being cast) equals myAbilityA 'THEN'-Actions [do something] 'ELSE'-Actions If (All conditions are true) then do (Then Actions) elser do (Else actions) 'IF'-Conditions (Ability being cast) equals myAbilityB 'THEN'-Actions [do something] 'ELSE'-Actions
The bug you may experience now is, that actions, in case myAbilityB was used, will never be done. Instead it behaves like its everytime myAbilityA being casted.
What's wrong here?
The problem is, that abilities aren't differentiated by names, tooltips, symbols or any other value, you can change with the object editor. Abilities are differentiated by types and if you create 2 custom abilities, based on 'Purge' for instance and want to differentiate between them like I did in the example above, it won't work.
One solution would be, to check for the abilities name (String comparison) instead of the ability itself:
Events: Unit - A unit owned by player 1 (red) starts the effect of an ability Conditions: Events: If (All conditions are true) then do (Then Actions) else do (Else actions) 'IF'-Conditions (Name of (Ability being cast)) equals myAbilityA 'THEN'-Actions [do something] 'ELSE'-Actions If (All conditions are true) then do (Then Actions) elser do (Else actions) 'IF'-Conditions (Name of(Ability being cast)) equals myAbilityB 'THEN'-Actions [do something] 'ELSE'-Actions
Another solution is to create one ability based on 'Purge' and as the second ability any dummy spell that does nothing else than releasing a trigger - in this case entanlge might fit. For your second dummy ability now create a dummy caster, something without models, shadows, with given ability 'locust'.... you know? (If not, check here for articels about how to use dummy abilites / caster.) Now you can use the trigger in the 1st example above, but myAbilityB should now be your dummy ability (like entangle f.i.) and if this is used, you create the dummy caster, making it casting 'Purge' - or what ever you myAbilityB wanted to do - on the given target.
The same problem occurs by the way using items, but I expierienced, that it sometimes does work, and sometimes it does not. See this example:
Events: Unit - A unit owned by player 1 (red) receives an item Conditions: Events: If (All conditions are true) then do (Then Actions) else do (Else actions) 'IF'-Conditions (Item-type of (Item being manipulated)) equals myItemA 'THEN'-Actions [do something] 'ELSE'-Actions If (All conditions are true) then do (Then Actions) elser do (Else actions) 'IF'-Conditions (Item-type of (Item being manipulated)) equals myItemB 'THEN'-Actions [do something] 'ELSE'-Actions
If myItemA and myItemB are based on the same item (boots of speed for instance) it might happen, that myItemB cannot be differed from myItemA. In that case, you could use the String comparision like I did in the ability example #2 above. Or you differ items from custom values you give them when being manipulated (sold, dropped, ... whatever). I did not expierienced enough to say that it is satisfactory, to base myItemA on boots of speed for instance and myItemB on sobi mask, but if you do not want to create a second DotA, you will find enough items that can be differed from each other. Just try it out or use in case of doubt the string comparision.