jnZ
I
- Reaction score
- 64
Code:
Cataclysm
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to Cataclysm
Actions
-------- Set Variables --------
Set ACataclysmIntegerPlayer = (Player number of (Owner of (Triggering unit)))
Set ACataclysmUnitCaster[ACataclysmIntegerPlayer] = (Triggering unit)
Set ACataclysmPointCaster[ACataclysmIntegerPlayer] = (Position of ACataclysmUnitCaster[ACataclysmIntegerPlayer])
Set ACataclysmForceEnemies[ACataclysmIntegerPlayer] = (All enemies of (Owner of ACataclysmUnitCaster[ACataclysmIntegerPlayer]))
[COLOR="Sienna"][B]Set ACataclysmGroupEffected[ACataclysmIntegerPlayer] = (Units within 300.00 of ACataclysmPointCaster[ACataclysmIntegerPlayer] matching (((Owner of (Matching unit)) is in ACataclysmForceEnemies[ACataclysmIntegerPlayer]) Equal to True))[/B][/COLOR]
-------- Effects --------
For each (Integer ACataclysmIntegerLoop) from 1 to 10, do (Actions)
Loop - Actions
Set ACataclysmPointLoopEffect[ACataclysmIntegerPlayer] = (ACataclysmPointCaster[ACataclysmIntegerPlayer] offset by 300.00 towards ((Real(ACataclysmIntegerLoop)) x (360.00 / 10.00)) degrees)
Special Effect - Create a special effect at ACataclysmPointLoopEffect[ACataclysmIntegerPlayer] using Abilities\Spells\Human\MassTeleport\MassTeleportCaster.mdl
Custom script: call RemoveLocation(udg_ACataclysmPointLoopEffect[udg_ACataclysmIntegerPlayer])
For each (Integer ACataclysmIntegerLoop) from 1 to 8, do (Actions)
Loop - Actions
Set ACataclysmPointLoopEffect[ACataclysmIntegerPlayer] = (ACataclysmPointCaster[ACataclysmIntegerPlayer] offset by 150.00 towards ((Real(ACataclysmIntegerLoop)) x (360.00 / 8.00)) degrees)
Special Effect - Create a special effect at ACataclysmPointLoopEffect[ACataclysmIntegerPlayer] using Abilities\Spells\Human\MassTeleport\MassTeleportCaster.mdl
Custom script: call RemoveLocation(udg_ACataclysmPointLoopEffect[udg_ACataclysmIntegerPlayer])
Special Effect - Create a special effect at ACataclysmPointCaster[ACataclysmIntegerPlayer] using Abilities\Spells\Human\MassTeleport\MassTeleportCaster.mdl
-------- Damage --------
Unit Group - Pick every unit in ACataclysmGroupEffected[ACataclysmIntegerPlayer] and do (Unit - Cause ACataclysmUnitCaster[ACataclysmIntegerPlayer] to damage (Picked unit), dealing (100.00 x (Real((Level of Cataclysm for ACataclysmUnitCaster[ACataclysmIntegerPlayer])))) damage of attack type Spells and damage type Normal)
-------- Reset Variables --------
Custom script: call RemoveLocation(udg_ACataclysmPointCaster[udg_ACataclysmIntegerPlayer])
Player Group - Remove all players from ACataclysmForceEnemies[ACataclysmIntegerPlayer]
Unit Group - Remove all units from ACataclysmGroupEffected[ACataclysmIntegerPlayer]
Set ACataclysmUnitCaster[ACataclysmIntegerPlayer] = No unit
Set ACataclysmIntegerPlayer = 0
thats the code and the problem is: no unit is damaged: i tried to replace the in range matching condition thing with in range and it worked (but it damages allied unit as well thats why i used the matching one). why does it not work, how to fix it? or what to use instead