Hello guys I'm making a triggered shockwave spell and I'm using Bribe's template
https://www.hiveworkshop.com/forums...ell-template-202003/?prev=d=list&r=20&u=Bribe
Also Flux has given me an example of the trigger a long time ago and I just apply it to Bribe's template.
Can you point out what I did wrong?
https://www.hiveworkshop.com/forums...ell-template-202003/?prev=d=list&r=20&u=BribeAlso Flux has given me an example of the trigger a long time ago and I just apply it to Bribe's template.
-
SW Init
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


-------- prevents re-creation --------
-


Custom script: call DestroyGroup(udg_Spell_Group[0])
-


Custom script: call DestroyGroup(udg_Spell_Group[1])
-
-
-
[/hidden]
-
SW C
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Shockwave (triggered)
-
-

Actions
-


-------- --------
-


-------- Create a dummy unit to represent this spell --------
-


-------- --------
-


Set Temp_Location = (Target point of ability being cast)
-


Unit - Create 1 Dummy Unit for (Triggering player) at Temp_Location facing 0.00 degrees
-


-------- --------
-


Set Temp_Unit = (Last created unit)
-


Set TempInteger = (Custom value of Temp_Unit)
-


-------- --------
-


Set TempInteger = (TempInteger + 1)
-


Set Spell_Caster[TempInteger] = (Triggering unit)
-


Set Temp_Location_2 = (Position of Spell_Caster[TempInteger])
-


Set Spell_Owner[TempInteger] = (Triggering player)
-


Set Spell_Distance[TempInteger] = 0.00
-


Set Spell_Missie_Facing[TempInteger] = (Angle from Temp_Location_2 to Temp_Location)
-


Unit - Create 1 Shockwave Missile for Spell_Owner[TempInteger] at Temp_Location_2 facing Spell_Missie_Facing[TempInteger] degrees
-


Set Spell_Missle[TempInteger] = (Last created unit)
-


-------- --------
-


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



If - Conditions
-




TempInteger Equal to 1
-
-



Then - Actions
-




-------- --------
-




-------- Turn on the loop trigger as it's currently off --------
-




-------- --------
-




Trigger - Turn on SW Loop <gen>
-
-



Else - Actions
-
-


-------- --------
-


-------- Add the dummy to this spell's group so that it can be referenced over time --------
-


-------- --------
-


Unit Group - Add Temp_Unit to Temp_Group
-


-------- --------
-


-------- Clean leaks of course --------
-


-------- --------
-


Custom script: call RemoveLocation(udg_Temp_Location)
-


Custom script: call RemoveLocation(udg_Temp_Location_2)
-
-
-
[/hidden]
-
SW Loop
-

Events
-


Time - Every 0.03 seconds of game time
-
-

Conditions
-

Actions
-


Unit Group - Pick every unit in Temp_Group and do (Actions)
-



Loop - Actions
-




Set Temp_Unit = (Picked unit)
-




Set TempInteger = (Custom value of Temp_Unit)
-




-------- --------
-




-------- This next chunk of code is just for the demo - change it to what you want your spell to be like --------
-




-------- --------
-




For each (Integer TempInteger) from 1 to TempInteger, do (Actions)
-





Loop - Actions
-






Set Temp_Location = (Position of Spell_Missle[Temp_Loop_Integer])
-






Set Temp_Location_2 = (Temp_Location offset by 40.00 towards Spell_Missie_Facing[Temp_Loop_Integer] degrees)
-






Set Spell_Distance[Temp_Loop_Integer] = (Spell_Distance[Temp_Loop_Integer] + 40.00)
-






Unit - Move Spell_Missle[Temp_Loop_Integer] instantly to Temp_Location_2
-






Custom script: set bj_wantDestroyGroup = true
-






Unit Group - Pick every unit in (Units within 200.00 of Temp_Location matching ((((Matching unit) belongs to an enemy of Spell_Owner[Temp_Loop_Integer]) Equal to True) and ((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True)))) and do (Actions)
-







Loop - Actions
-








Set Temp_Target = (Picked unit)
-








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









If - Conditions
-










(Temp_Target is in Spell_Group[Temp_Loop_Integer]) Equal to False
-
-









Then - Actions
-










Unit - Cause TempUnit to damage Temp_Target, dealing 100.00 damage of attack type Spells and damage type Normal
-










Unit Group - Add Temp_Target to Spell_Group[Temp_Loop_Integer]
-
-









Else - Actions
-
-
-
-
-
-




Custom script: call RemoveLocation(udg_Temp_Location)
-




Custom script: call RemoveLocation(udg_Temp_Location_2)
-




-------- --------
-




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





If - Conditions
-






Spell_Distance[Temp_Loop_Integer] Greater than or equal to 1000.00
-
-





Then - Actions
-






Unit - Kill Spell_Missle[Temp_Loop_Integer]
-






Unit Group - Remove Temp_Unit from Temp_Group
-






Unit - Remove Temp_Unit from the game
-






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







If - Conditions
-








(Temp_Group is empty) Equal to True
-
-







Then - Actions
-








-------- --------
-








-------- Turn off this trigger as it's currently doing nothing --------
-








-------- --------
-








Trigger - Turn off SW Loop <gen>
-
-







Else - Actions
-
-
-





Else - Actions
-
-
-
-
-
-
[/hidden]
Can you point out what I did wrong?
Last edited:



Anyway I'm still trying.





