Trigger - Add to Unit is Attacked <gen> the event (Unit - (Triggering unit) Is attacked)
Unit is Attacked
Trigger:
Events
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) has buff Reflect) Equal to True
Then - Actions
Set HitsTaken[(Player number of (Owner of (Triggering unit)))] = (HitsTaken[(Player number of (Owner of (Triggering unit)))] + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
HitsTaken[(Player number of (Owner of (Triggering unit)))] Equal to 5
Then - Actions
Set TempPoint = (Position of (Triggering unit))
Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 400.00 at TempPoint, dealing 100.00 damage of attack type Spells and damage type Normal
Special Effect - Create a special effect at TempPoint using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
Special Effect - Destroy (Last created special effect)
you can also add a bunch of other ifs thens and elses to this trigger for other abilities that trigger upon attack
notes:
-"hits taken" is an integer with an array of 12, I asumed that eaach player wold only have one unit casting this ability
-"temp point" is used to prevent lag, it is removed with the custom script
-neutral building explosion is listed under spawned effects, it would be a good effect for this ability imo "BOOM!" hehe
-Triggering unit is the correct function for "unit is attacked" btw, this is not a mistake
you order it to cast the spell wich you based your spell of. e.g. if you have a skill URSKILL, based of thunder clap, you order human - mountain king - thunder clap
This is the map you need exactly just copy triggers variables and spells.If you need your ability to be cast just change the buff of the trigger to the buff that your skill gives.
Ghan has said he has fixed this. Monovertex please confirm this fix. This was only a problem with people that had signatures in the upper levels like not the special members but the respected members.