Wondering if someone could give me a hint towards what I'm doing incorrectly here. I've been working on a stat based spells only to lead to failure so I tried to recreate this trigger from this post after many attempts to do it myself + other guides on hive, the spell will deal damage to the first unit however the others receive lightning animation on them but no damage. I'm really trying to learn how to build these spells myself and correct my other attribute spells accordingly, appreciate any pointers here.
(I'd say I'm new ish to custom spells and damage engines)
(I'd say I'm new ish to custom spells and damage engines)
-
Lightning Blast Copy
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Lightning Blast
-
-
Actions
-
-------- -------------------------------------------------------------------------------------------- --------
-
-------- Set Variables --------
-
-------- -------------------------------------------------------------------------------------------- --------
-
Set VariableSet LB_Caster = (Triggering unit)
-
Set VariableSet LB_Owner = (Owner of LB_Caster)
-
Set VariableSet LB_Target = (Target unit of ability being cast)
-
Set VariableSet LB_Level = (Level of Lightning Blast for LB_Caster)
-
Set VariableSet LB_Level_Convert = (Real(LB_Level))
-
Set VariableSet LB_Damage = ((LB_Level_Convert x 0.25) x (Real((Intelligence of LB_Caster (Include bonuses)))))
-
Set VariableSet LB_Count = 4
-
Set VariableSet LB_Point = (Position of LB_Target)
-
-------- -------------------------------------------------------------------------------------------- --------
-
-------- -------------------------------------------------------------------------------------------- --------
-
Unit - Cause LB_Caster to damage LB_Target, dealing LB_Damage damage of attack type Spells and damage type Normal
-
Unit - Create 1 Dummy for LB_Owner at LB_Point facing Default building facing degrees
-
Set VariableSet Temp_Unit = (Last created unit)
-
Unit - Add a 1.00 second Generic expiration timer to Temp_Unit
-
Unit - Add Lightning Blast to Temp_Unit
-
Unit - Set level of Lightning Blast for Temp_Unit to LB_Level
-
Unit - Order Temp_Unit to Undead Banshee - Curse LB_Target
-
-
-
Lightning Blast Loop
-
Events
-
Time - Every 0.40 seconds of game time
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
LB_Count Greater than 0
-
-
Then - Actions
-
Set VariableSet tempGroup = (Units within 750.00 of LB_Point matching ((((Matching unit) has buff Lightning Blast Dummy ) Equal to False) and ((((Matching unit) belongs to an enemy of LB_Owner.) Equal to True) and (((Matching unit) is alive) Equal to True))).)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in tempGroup) Greater than 0
-
-
Then - Actions
-
Set VariableSet LB_Count = (LB_Count - 1)
-
Set VariableSet LB_Target = (Random unit from tempGroup)
-
Set VariableSet tempLocation = (Position of LB_Target)
-
Set VariableSet LB_Damage = ((LB_Level_Convert x 0.25) x (Real((Intelligence of LB_Caster (Include bonuses)))))
-
Unit - Cause LB_Caster to damage LB_Target, dealing LB_Damage damage of attack type Spells and damage type Normal
-
Lightning - Move LB_Light to source (Position of LB_Caster) and target (Position of LB_Caster)
-
Custom script: set udg_LB_Light = AddLightningEx("CLPB", true , GetLocationX(udg_LB_Point), GetLocationY(udg_LB_Point), GetLocationZ(udg_LB_Point) + 70, GetLocationX(udg_tempLocation), GetLocationY(udg_tempLocation), GetLocationZ(udg_tempLocation) + 70)
-
Custom script: call RemoveLocation(udg_LB_Point)
-
Set VariableSet LB_Point = (Position of LB_Target)
-
Custom script: call RemoveLocation(udg_tempLocation)
-
Unit - Create 1 Dummy for LB_Owner at LB_Point facing Default building facing degrees
-
Set VariableSet Temp_Unit = (Last created unit)
-
Unit - Add a 1.00 second Generic expiration timer to Temp_Unit
-
Unit - Add Lightning Blast to Temp_Unit
-
Unit - Set level of Lightning Blast for Temp_Unit to LB_Level
-
Unit - Order Temp_Unit to Undead Banshee - Curse LB_Target
-
-
Else - Actions
-
Lightning - Destroy LB_Light
-
Custom script: call DestroyGroup(udg_tempGroup)
-
Custom script: call RemoveLocation(udg_LB_Point)
-
Custom script: call RemoveLocation(udg_tempLocation)
-
Trigger - Turn off (This trigger)
-
-
-
-
Else - Actions
-
Lightning - Destroy LB_Light
-
Custom script: call DestroyGroup(udg_tempGroup)
-
Custom script: call RemoveLocation(udg_LB_Point)
-
Custom script: call RemoveLocation(udg_tempLocation)
-
Trigger - Turn off (This trigger)
-
-
-
-