- Joined
- Apr 22, 2020
- Messages
- 430
Well to be more specific i want the Forked lightning ability to have a damage over time for like 10 damage per second that last through 10 seconds does anyone know how to trigger this?
Pardon me but i can't really understand what exactly is the trigger that i have make. Can you post me a trigger of it?You would need to trigger it.
Detect the cast > Get Units within X around Target >apply lightning to viable targets & set them up for damage over time (ex dynamic indexing.) > tick.
I was fiddling with lightning earlier so I don't mind whipping this up for you.
Sorry but i can't open it can you just post the triggers? How To Post Your Trigger.
My God those are some complex triggers i'm currently using the ver 1.24 of WTF and luckily i have my cousin here who has the ver 1.30 of WTF and he told me i can freely use it so that's good for me i guess....What version are you using?
Config
Cast
- ReSp Config
- Events
- Map initialization
- Conditions
- Actions
- Set ReSp_Config_Spell_ID[1] = Forked Over Time ReSp
- Set ReSp_Config_Spell_ID[2] = Dummy spell 2 ReSp
- Set ReSp_Config_Buff = Forked over time ReSp
- Set ReSp_Config_Dummy_Type = Caster Dummy Unit ReSp
- Set ReSp_Config_Duration[1] = 10.00
- Set ReSp_Config_Duration[2] = 10.00
- Set ReSp_Config_Duration[3] = 10.00
- Set ReSp_Config_Damage_Distribute[1] = 100.00
- Set ReSp_Config_Damage_Distribute[2] = 175.00
- Set ReSp_Config_Damage_Distribute[3] = 225.00
- Set ReSp_Config_Jump_Max[1] = 3
- Set ReSp_Config_Jump_Max[2] = 5
- Set ReSp_Config_Jump_Max[3] = 7
- Set ReSp_Config_Jump_AOE[1] = 300.00
- Set ReSp_Config_Jump_AOE[2] = 300.00
- Set ReSp_Config_Jump_AOE[3] = 300.00
- Set ReSp_Config_Height[0] = 40.00
- Set ReSp_Config_Lightning_Type = Forked Lightning
- Set ReSp_Config_Lightning_Delay = 0.70
- Set ReSp_A_Point[0] = (Center of (Playable map area))
- Unit - Create 1 Albatross for Neutral Passive at ReSp_A_Point[0] facing Default building facing degrees
- Unit - Add ReSp_Config_Spell_ID[1] to (Last created unit)
- Unit - Add ReSp_Config_Spell_ID[2] to (Last created unit)
- Unit - Add a 0.01 second Generic expiration timer to (Last created unit)
- Custom script: call RemoveLocation(udg_ReSp_A_Point[0])
Periodic
- ReSp Cast
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to ReSp_Config_Spell_ID[1]
- (Current order of (Triggering unit)) Equal to (Order(starfall))
- Actions
- -------- --------
- -------- --------
- Set ReSp_A_Unit[0] = (Triggering unit)
- Set ReSp_A_Spell_Level = (Level of ReSp_Config_Spell_ID[1] for ReSp_A_Unit[0])
- Set ReSp_A_Unit[1] = (Target unit of ability being cast)
- Set ReSp_A_Point[2] = (Position of ReSp_A_Unit[0])
- Set ReSp_A_Point[0] = (Position of ReSp_A_Unit[1])
- -------- --------
- Unit - Create 1 ReSp_Config_Dummy_Type for (Triggering player) at ReSp_A_Point[0] facing Default building facing degrees
- Set ReSp_A_Unit[2] = (Last created unit)
- Unit - Add ReSp_Config_Spell_ID[2] to ReSp_A_Unit[2]
- Unit - Order ReSp_A_Unit[2] to Undead Necromancer - Cripple ReSp_A_Unit[1]
- Special Effect - Create a special effect attached to the origijn of ReSp_A_Unit[1] using Abilities\Weapons\Bolt\BoltImpact.mdl
- Special Effect - Destroy (Last created special effect)
- -------- --------
- Set ReSp_B_Jumps = (ReSp_Config_Jump_Max[ReSp_A_Spell_Level] - 1)
- -------- --------
- Set ReSp_A_Index = (ReSp_A_Index + 1)
- -------- --------
- Custom script: set udg_ReSp_Point_Z_Height[1] = GetLocationZ(udg_ReSp_A_Point[2])
- Set ReSp_XYZ[1] = (X of ReSp_A_Point[2])
- Set ReSp_XYZ[2] = (Y of ReSp_A_Point[2])
- Set ReSp_XYZ[3] = (((Current flying height of ReSp_A_Unit[0]) + ReSp_Config_Height[0]) + ReSp_Point_Z_Height[1])
- Custom script: set udg_ReSp_Point_Z_Height[0] = GetLocationZ(udg_ReSp_A_Point[0])
- Set ReSp_XYZ2[1] = (X of ReSp_A_Point[0])
- Set ReSp_XYZ2[2] = (Y of ReSp_A_Point[0])
- Set ReSp_XYZ2[3] = ((Current flying height of ReSp_A_Unit[1]) + (ReSp_Config_Height[0] + ReSp_Point_Z_Height[0]))
- Custom script: set udg_ReSp_B_Lightning[(udg_ReSp_A_Index)] = AddLightningEx(udg_ReSp_Config_Lightning_Type, true, udg_ReSp_XYZ[1], udg_ReSp_XYZ[2], udg_ReSp_XYZ[3], udg_ReSp_XYZ2[1], udg_ReSp_XYZ2[2], udg_ReSp_XYZ2[3])
- Custom script: call RemoveLocation(udg_ReSp_A_Point[2])
- Custom script: call RemoveLocation(udg_ReSp_A_Point[0])
- -------- --------
- Set ReSp_B_Caster[ReSp_A_Index] = ReSp_A_Unit[0]
- Set ReSp_B_Target_Previous[ReSp_A_Index] = ReSp_A_Unit[0]
- Set ReSp_B_Target[ReSp_A_Index] = ReSp_A_Unit[1]
- Set ReSp_B_Damage_Distribute[ReSp_A_Index] = ReSp_Config_Damage_Distribute[ReSp_A_Spell_Level]
- Set ReSp_B_Duratiion[ReSp_A_Index] = ReSp_Config_Duration[ReSp_A_Spell_Level]
- Set ReSp_B_Lightning_Delay[ReSp_A_Index] = ReSp_Config_Lightning_Delay
- Set ReSp_B_Lightning_State[ReSp_A_Index] = True
- -------- --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ReSp_A_Index Equal to 1
- Then - Actions
- Trigger - Turn on ReSp Periodic <gen>
- Else - Actions
- -------- --------
- For each (Integer ReSp_A_Loop_Cast) from 1 to (ReSp_Config_Jump_Max[ReSp_A_Spell_Level] - 1), do (Actions)
- Loop - Actions
- Set ReSp_A_Unit[3] = No unit
- Set ReSp_A_Point[1] = (Position of ReSp_A_Unit[1])
- Custom script: set bj_wantDestroyGroup = true
- Unit Group - Pick every unit in (Units within ReSp_Config_Jump_AOE[ReSp_A_Spell_Level] of ReSp_A_Point[1]) and do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Picked unit) is A structure) Equal to False
- ((Picked unit) is Magic Immune) Equal to False
- ((Picked unit) is alive) Equal to True
- ((Picked unit) belongs to an enemy of (Owner of ReSp_A_Unit[0])) Equal to True
- (Picked unit) Not equal to ReSp_A_Unit[1]
- ((Picked unit) has buff ReSp_Config_Buff) Equal to False
- Then - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ReSp_A_Unit[3] Equal to No unit
- Then - Actions
- Set ReSp_A_Unit[3] = (Picked unit)
- Else - Actions
- Set ReSp_A_Unit[4] = (Picked unit)
- Set ReSp_A_Point[2] = (Position of ReSp_A_Unit[3])
- Set ReSp_A_Point[3] = (Position of ReSp_A_Unit[1])
- Set ReSp_A_Point[4] = (Position of ReSp_A_Unit[4])
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Distance between ReSp_A_Point[3] and ReSp_A_Point[4]) Less than or equal to (Distance between ReSp_A_Point[3] and ReSp_A_Point[2])
- Then - Actions
- Set ReSp_A_Unit[3] = ReSp_A_Unit[4]
- Else - Actions
- Custom script: call RemoveLocation(udg_ReSp_A_Point[4])
- Custom script: call RemoveLocation(udg_ReSp_A_Point[3])
- Custom script: call RemoveLocation(udg_ReSp_A_Point[2])
- Else - Actions
- Custom script: call RemoveLocation(udg_ReSp_A_Point[1])
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ReSp_B_Jumps Greater than 0
- ReSp_A_Unit[3] Not equal to No unit
- Then - Actions
- Set ReSp_B_Jumps = (ReSp_B_Jumps - 1)
- Unit - Order ReSp_A_Unit[2] to Undead Necromancer - Cripple ReSp_A_Unit[3]
- Special Effect - Create a special effect attached to the origijn of ReSp_A_Unit[3] using Abilities\Weapons\Bolt\BoltImpact.mdl
- Special Effect - Destroy (Last created special effect)
- Set ReSp_A_Point[1] = (Position of ReSp_A_Unit[0])
- Set ReSp_A_Point[2] = (Position of ReSp_A_Unit[3])
- -------- Negotiate with the triggers about where the lightning will be created --------
- Custom script: set udg_ReSp_Point_Z_Height[0] = GetLocationZ(udg_ReSp_A_Point[1])
- Set ReSp_XYZ[1] = (X of ReSp_A_Point[1])
- Set ReSp_XYZ[2] = (Y of ReSp_A_Point[1])
- Set ReSp_XYZ[3] = ((Current flying height of ReSp_A_Unit[1]) + (ReSp_Config_Height[0] + ReSp_Point_Z_Height[0]))
- Custom script: set udg_ReSp_Point_Z_Height[1] = GetLocationZ(udg_ReSp_A_Point[2])
- Set ReSp_XYZ2[1] = (X of ReSp_A_Point[2])
- Set ReSp_XYZ2[2] = (Y of ReSp_A_Point[2])
- Set ReSp_XYZ2[3] = (((Current flying height of ReSp_A_Unit[3]) + ReSp_Config_Height[0]) + ReSp_Point_Z_Height[1])
- -------- --------
- Set ReSp_A_Index = (ReSp_A_Index + 1)
- -------- --------
- -------- Create some lighning like some rad 90's wizard on some dad's van --------
- Custom script: set udg_ReSp_B_Lightning[(udg_ReSp_A_Index)] = AddLightningEx(udg_ReSp_Config_Lightning_Type, true, udg_ReSp_XYZ[1], udg_ReSp_XYZ[2], udg_ReSp_XYZ[3], udg_ReSp_XYZ2[1], udg_ReSp_XYZ2[2], udg_ReSp_XYZ2[3])
- -------- --------
- Set ReSp_B_Caster[ReSp_A_Index] = ReSp_A_Unit[0]
- Set ReSp_B_Target[ReSp_A_Index] = ReSp_A_Unit[3]
- Set ReSp_B_Target_Previous[ReSp_A_Index] = ReSp_A_Unit[0]
- Set ReSp_B_Damage_Distribute[ReSp_A_Index] = ReSp_Config_Damage_Distribute[ReSp_A_Spell_Level]
- Set ReSp_B_Duratiion[ReSp_A_Index] = ReSp_Config_Duration[ReSp_A_Spell_Level]
- Set ReSp_B_Lightning_Delay[ReSp_A_Index] = ReSp_Config_Lightning_Delay
- Set ReSp_B_Lightning_State[ReSp_A_Index] = True
- -------- --------
- -------- --------
- Custom script: call RemoveLocation(udg_ReSp_A_Point[1])
- Custom script: call RemoveLocation(udg_ReSp_A_Point[2])
- Else - Actions
- Custom script: call RemoveLocation(udg_ReSp_A_Point[0])
- ReSp Periodic
- Events
- Time - Every 0.05 seconds of game time
- Conditions
- Actions
- For each (Integer ReSp_A_Loop) from 1 to ReSp_A_Index, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ReSp_B_Duratiion[ReSp_A_Loop] Greater than 0.00
- Then - Actions
- Set ReSp_B_Duratiion[ReSp_A_Loop] = (ReSp_B_Duratiion[ReSp_A_Loop] - 0.05)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (ReSp_B_Duratiion[ReSp_A_Loop] mod 1.00) Equal to 0.05
- Then - Actions
- Unit - Cause ReSp_B_Caster[ReSp_A_Loop] to damage ReSp_B_Target[ReSp_A_Loop], dealing (ReSp_B_Damage_Distribute[ReSp_A_Loop] / ReSp_Config_Duration[(Level of ReSp_Config_Spell_ID[1] for ReSp_B_Caster[ReSp_A_Loop])]) damage of attack type Spells and damage type Universal
- Special Effect - Create a special effect attached to the origin of ReSp_B_Target[ReSp_A_Loop] using Abilities\Weapons\ChimaeraLightningMissile\ChimaeraLightningMissile.mdl
- Special Effect - Destroy (Last created special effect)
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ReSp_B_Lightning_Delay[ReSp_A_Loop] Greater than 0.00
- Then - Actions
- Set ReSp_B_Lightning_Delay[ReSp_A_Loop] = (ReSp_B_Lightning_Delay[ReSp_A_Loop] - 0.05)
- Lightning - Change color of ReSp_B_Lightning[ReSp_A_Loop] to (1.00 1.00 1.00) with ((1.00 / ReSp_Config_Lightning_Delay) x ReSp_B_Lightning_Delay[ReSp_A_Loop]) alpha
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ReSp_B_Target_Previous[ReSp_A_Loop] Not equal to No unit
- Then - Actions
- Set ReSp_A_Point[4] = (Position of ReSp_B_Target_Previous[ReSp_A_Loop])
- Set ReSp_A_Point[5] = (Position of ReSp_B_Target[ReSp_A_Loop])
- Custom script: set udg_ReSp_Point_Z_Height[0] = GetLocationZ(udg_ReSp_A_Point[4])
- Set ReSp_XYZ[4] = (X of ReSp_A_Point[4])
- Set ReSp_XYZ[5] = (Y of ReSp_A_Point[4])
- Set ReSp_XYZ[6] = ((Current flying height of ReSp_B_Target_Previous[ReSp_A_Loop]) + (ReSp_Config_Height[0] + ReSp_Point_Z_Height[0]))
- Custom script: set udg_ReSp_Point_Z_Height[1] = GetLocationZ(udg_ReSp_A_Point[5])
- Set ReSp_XYZ2[4] = (X of ReSp_A_Point[5])
- Set ReSp_XYZ2[5] = (Y of ReSp_A_Point[5])
- Set ReSp_XYZ2[6] = (((Current flying height of ReSp_B_Target[ReSp_A_Loop]) + ReSp_Config_Height[0]) + ReSp_Point_Z_Height[1])
- Custom script: call MoveLightningEx(udg_ReSp_B_Lightning[(udg_ReSp_A_Loop)], true, udg_ReSp_XYZ[4], udg_ReSp_XYZ[5], udg_ReSp_XYZ[6], udg_ReSp_XYZ2[4], udg_ReSp_XYZ2[5], udg_ReSp_XYZ2[6])
- Custom script: call RemoveLocation(udg_ReSp_A_Point[4])
- Custom script: call RemoveLocation(udg_ReSp_A_Point[5])
- Else - Actions
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ReSp_B_Lightning_State[ReSp_A_Loop] Equal to True
- Then - Actions
- Lightning - Destroy ReSp_B_Lightning[ReSp_A_Loop]
- Set ReSp_B_Lightning_State[ReSp_A_Loop] = False
- Else - Actions
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ReSp_B_Lightning_State[ReSp_A_Loop] Equal to True
- Then - Actions
- Lightning - Destroy ReSp_B_Lightning[ReSp_A_Loop]
- Set ReSp_B_Lightning_State[ReSp_A_Loop] = False
- Else - Actions
- -------- --------
- Set ReSp_B_Target_Previous[ReSp_A_Loop] = No unit
- Set ReSp_B_Caster[ReSp_A_Loop] = ReSp_B_Caster[ReSp_A_Index]
- Set ReSp_B_Damage_Distribute[ReSp_A_Loop] = ReSp_B_Damage_Distribute[ReSp_A_Index]
- Set ReSp_B_Duratiion[ReSp_A_Loop] = ReSp_B_Duratiion[ReSp_A_Index]
- Set ReSp_B_Lightning_Delay[ReSp_A_Loop] = ReSp_B_Lightning_Delay[ReSp_A_Index]
- Set ReSp_B_Target[ReSp_A_Loop] = ReSp_B_Target[ReSp_A_Index]
- Set ReSp_B_Target_Previous[ReSp_A_Loop] = ReSp_B_Target_Previous[ReSp_A_Index]
- Set ReSp_B_Lightning[ReSp_A_Loop] = ReSp_B_Lightning[ReSp_A_Index]
- Set ReSp_B_Lightning_State[ReSp_A_Loop] = ReSp_B_Lightning_State[ReSp_A_Index]
- Set ReSp_A_Index = (ReSp_A_Index - 1)
- Set ReSp_A_Loop = (ReSp_A_Loop - 1)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ReSp_A_Index Equal to 0
- Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions