Moderator
M
Moderator
09:47, 29th Aug 2010
TriggerHappy:
Updated your code and spell worked fine.
TriggerHappy:
Updated your code and spell worked fine.

Flare Seal

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Flare Seal

Actions


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



If - Conditions




FSeal_Index[1] Equal to 0



Then - Actions




Trigger - Turn on Flare Seal Fire Loop <gen>



Else - Actions


-------- Don't change these parts. --------


Set FSeal_Index[1] = (FSeal_Index[1] + 1)


Set FSeal_Index[2] = (FSeal_Index[2] + 1)


Set FSeal_Caster[FSeal_Index[2]] = (Triggering unit)


Set FSeal_LoopIsOn[FSeal_Index[2]] = True


Set FSeal_FirstEnd[FSeal_Index[2]] = False


-------- Maximum Range. If you change this area, change also all values with 350 or -350 in the Flare Seal Fire Loop trigger. --------


Set FSeal_CurrentRange[FSeal_Index[2]] = 350.00


-------- Set Damage here. --------


Set FSeal_DMG[FSeal_Index[2]] = (((Real((Level of (Ability being cast) for (Triggering unit)))) + 4.00) x (Real((Intelligence of (Triggering unit) (Include bonuses)))))


-------- Just set this to 0 and you won't have any problems. Counts number of seconds to wait. --------


Set FSeal_Wait[FSeal_Index[2]] = 0.00


-------- We need to declare the group variable so we don't have any problems removing dummy --------


Set FSeal_FireGroupDummy[FSeal_Index[2]] = (Units owned by (Owner of (Triggering unit)) of type Flare Seal Dummy Fire)


Unit - Pause (Triggering unit)
Flare Seal Fire Loop

Events


Time - Every 0.20 seconds of game time

Conditions

Actions


For each (Integer FSeal_Index[3]) from 1 to FSeal_Index[2], do (Actions)



Loop - Actions




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





If - Conditions






FSeal_LoopIsOn[FSeal_Index[3]] Equal to True





Then - Actions






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







If - Conditions








(FSeal_Caster[FSeal_Index[3]] is alive) Equal to True







Then - Actions








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









If - Conditions










FSeal_FirstEnd[FSeal_Index[3]] Equal to False









Then - Actions










Set FSeal_TempPoint[1] = (Position of FSeal_Caster[FSeal_Index[3]])










Set FSeal_TempPoint[2] = (FSeal_TempPoint[1] offset by FSeal_CurrentRange[FSeal_Index[3]] towards 45.00 degrees)










Unit - Create 1 Flare Seal Dummy Fire for (Owner of FSeal_Caster[FSeal_Index[3]]) at FSeal_TempPoint[2] facing Default building facing degrees










Unit Group - Add (Last created unit) to FSeal_FireGroupDummy[FSeal_Index[3]]










Set FSeal_CurrentRange[FSeal_Index[3]] = (FSeal_CurrentRange[FSeal_Index[3]] - 40.00)










Custom script: call RemoveLocation(udg_FSeal_TempPoint[1])










Custom script: call RemoveLocation(udg_FSeal_TempPoint[2])










Set FSeal_TempPoint[1] = (Position of FSeal_Caster[FSeal_Index[3]])










Set FSeal_TempPoint[2] = (FSeal_TempPoint[1] offset by FSeal_CurrentRange[FSeal_Index[3]] towards 135.00 degrees)










Unit - Create 1 Flare Seal Dummy Fire for (Owner of FSeal_Caster[FSeal_Index[3]]) at FSeal_TempPoint[2] facing Default building facing degrees










Unit Group - Add (Last created unit) to FSeal_FireGroupDummy[FSeal_Index[3]]










Set FSeal_CurrentRange[FSeal_Index[3]] = (FSeal_CurrentRange[FSeal_Index[3]] - 40.00)










Custom script: call RemoveLocation(udg_FSeal_TempPoint[1])










Custom script: call RemoveLocation(udg_FSeal_TempPoint[2])










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











If - Conditions












FSeal_CurrentRange[FSeal_Index[3]] Less than or equal to -350.00











Then - Actions












Set FSeal_FirstEnd[FSeal_Index[3]] = True












Set FSeal_CurrentRange[FSeal_Index[3]] = 350.00











Else - Actions









Else - Actions










Set FSeal_Wait[FSeal_Index[3]] = (FSeal_Wait[FSeal_Index[3]] + 0.20)










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











If - Conditions












FSeal_Wait[FSeal_Index[3]] Greater than or equal to 0.80











Then - Actions












Set TempPoint = (Position of FSeal_Caster[FSeal_Index[3]])












For each (Integer FSeal_Index[4]) from 1 to 2, do (Actions)













Loop - Actions














Custom script: set bj_wantDestroyGroup = true














Unit Group - Pick every unit in (Units within 350.00 of TempPoint matching (((Matching unit) belongs to an enemy of (Owner of FSeal_Caster[FSeal_Index[3]])) Equal to True)) and do (Actions)















Loop - Actions
















Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\Doom\DoomDeath.mdl
















Special Effect - Destroy (Last created special effect)
















Unit - Cause FSeal_Caster[FSeal_Index[3]] to damage (Picked unit), dealing FSeal_DMG[FSeal_Index[3]] damage of attack type Spells and damage type Normal












Custom script: call RemoveLocation(udg_TempPoint)












Unit Group - Pick every unit in FSeal_FireGroupDummy[FSeal_Index[3]] and do (Actions)













Loop - Actions














Unit - Remove (Picked unit) from the game












Unit - Unpause FSeal_Caster[FSeal_Index[3]]












Unit - Order FSeal_Caster[FSeal_Index[3]] to Stop












Custom script: call DestroyGroup(udg_FSeal_FireGroupDummy[udg_FSeal_Index[3]])












Set FSeal_LoopIsOn[FSeal_Index[3]] = False












Set FSeal_Index[1] = (FSeal_Index[1] - 1)












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













If - Conditions














FSeal_Index[1] Equal to 0













Then - Actions














Trigger - Turn off (This trigger)













Else - Actions











Else - Actions







Else - Actions








Unit Group - Pick every unit in FSeal_FireGroupDummy[FSeal_Index[3]] and do (Actions)









Loop - Actions










Unit - Remove (Picked unit) from the game








Custom script: call DestroyGroup(udg_FSeal_FireGroupDummy[udg_FSeal_Index[3]])








Unit - Unpause FSeal_Caster[FSeal_Index[3]]








Unit - Order FSeal_Caster[FSeal_Index[3]] to Stop








Set FSeal_LoopIsOn[FSeal_Index[3]] = False








Set FSeal_Index[1] = (FSeal_Index[1] - 1)








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









If - Conditions










FSeal_Index[1] Equal to 0









Then - Actions










Trigger - Turn off (This trigger)









Else - Actions





Else - Actions