- Joined
- Jun 16, 2008
- Messages
- 1,936
Look! I wanted to make the spell: "Divine Lightning", wich should cast a chainlightning on every unit in a 1000 AOE around the caster. Here is my trigger:
-
EffectDL
-

events
-


unit - A unit starts the effect of an ability
-
-

conditions
-


(Ability being cast) equal to Divine Lightning
-
-

actions
-


Set Caster = (Casting unit)
-


Set TempLoc00 = (Position of Caster)
-


Set UnitGroup = (Random ((Level of Divine Lightning for Caster) x 3) units from (Units in (Region centered at (Position of Caster) with size (1000.00, 1000.00))))
-


unitgroup - Pick every unit in UnitGroup and do (Actions)
-



loop - actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





'IF'-conditions
-






((Picked unit) belongs to an enemy of (Owner of Caster)) equal to True
-
-





'THEN'-actions
-






Set Target = (Picked unit)
-






Set TempLoc01 = (Position of (Picked unit))
-






unit - Create 1 Dummy for (Owner of Caster) at TempLoc01 facing default building degrees
-






unit - Add DummyDivineLightning to (Last created unit)
-






unit - Set level of DummyDivineLightning for (Last created unit) to (Level of Divine Lightning for Caster)
-






unit - Order (Last created unit) to Orc-far seer - 'chainlightning' Target
-






unit - Add a 1.50 second default expiration timer to (Last created unit)
-






Custom script: call RemoveLocation(udg_TempLoc01)
-






Custom script: set udg_Target = null
-
-





'ELSE'-actions
-
-
-
-


Custom script: call RemoveLocation(udg_TempLoc00)
-


Custom script: call DestroyGroup(udg_UnitGroup)
-


Custom script: set udg_Caster = null
-
-











