Check to see if this spell is leakless?

Status
Not open for further replies.
Level 2
Joined
Sep 3, 2009
Messages
15
TRIPLE FIRE WAVE

Unit - A unit Starts the effect of an ability

(Ability being cast) Equal to Triple Fire Wave

Set Triple_Fire_Wave_Caster = (Casting unit)
Set Triple_Fire_Wave_Point[0] = (Position of Triple_Fire_Wave_Caster)
Set Triple_Fire_Wave_Point[1] = (Target point of ability being cast)
Set Triple_Fire_Wave_Angle = (Angle from Triple_Fire_Wave_Point[0] to Triple_Fire_Wave_Point[1])
Set Triple_Fire_Wave_Loop = 0.00
Set Triple_Fire_Wave_Time = 0
Custom script: call RemoveLocation (udg_Triple_Fire_Wave_Point[1])
Trigger - Turn on Triple Fire Wave Loop <gen>

TRIPLE FIRE WAVE LOOP

Time - Every 0.02 seconds of game time

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Triple_Fire_Wave_Time Equal to 50
Then - Actions
Trigger - Turn off (This trigger)
Set Triple_Fire_Wave_Caster = No unit
Custom script: call RemoveLocation (udg_Triple_Fire_Wave_Point[0])
Else - Actions
Set Triple_Fire_Wave_Time = (Triple_Fire_Wave_Time + 1)
Set Triple_Fire_Wave_Loop = (Triple_Fire_Wave_Loop + (5.00 + (3.00 x (Real((Level of Triple Fire Wave for Triple_Fire_Wave_Caster))))))
For each (Integer A) from 1 to 3, do (Actions)
Loop - Actions
Set Triple_Fire_Wave_Point[(Integer A)] = (Triple_Fire_Wave_Point[0] offset by Triple_Fire_Wave_Loop towards ((Triple_Fire_Wave_Angle - 60.00) + ((Real((Integer A))) x 30.00)) degrees)
Special Effect - Create a special effect at Triple_Fire_Wave_Point[(Integer A)] using Abilities\Spells\Items\AIfb\AIfbSpecialArt.mdl
Special Effect - Destroy (Last created special effect)
Set Triple_Fire_Wave_UGroup = (Units within 150.00 of Triple_Fire_Wave_Point[(Integer A)] matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of Triple_Fire_Wave_Caster)) Equal to True)))
Unit Group - Pick every unit in Triple_Fire_Wave_UGroup and do (Actions)
Loop - Actions
Unit - Cause Triple_Fire_Wave_Caster to damage (Picked unit), dealing (((Real((Level of Triple Fire Wave for Triple_Fire_Wave_Caster))) x (Real((Level of Triple Fire Wave for Triple_Fire_Wave_Caster)))) x 2.00) damage of attack type Spells and damage type Normal
Custom script: call RemoveLocation (udg_Triple_Fire_Wave_Point[GetForLoopIndexA()])
Custom script: call DestroyGroup(udg_Triple_Fire_Wave_UGroup)

I wanna make sure to see if this is leakless. Also, if there is a better or shorter way to make this spell.
 
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

  • Triple Fire Wave
    • Events:
      • Unit - A unit Starts the effect of an ability
    • Conditions:
      • (Ability being cast) Equal to Triple Fire Wave
    • Actions:
      • Set Triple_Fire_Wave_Caster = (Casting unit)
      • Set Triple_Fire_Wave_Point[0] = (Position of Triple_Fire_Wave_Caster)
      • Set Triple_Fire_Wave_Point[1] = (Target point of ability being cast)
      • Set Triple_Fire_Wave_Angle = (Angle from Triple_Fire_Wave_Point[0] to Triple_Fire_Wave_Point[1])
      • Set Triple_Fire_Wave_Loop = 0.00
      • Set Triple_Fire_Wave_Time = 0
      • Custom script: call RemoveLocation (udg_Triple_Fire_Wave_Point[1])
      • Trigger - Turn on Triple Fire Wave Loop <gen>
  • Triple Fire Wave Loop
  • Events:
    • Time - Every 0.02 seconds of game time
  • Conditions:
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Triple_Fire_Wave_Time Equal to 50
      • Then - Actions
        • Trigger - Turn off (This trigger)
        • Set Triple_Fire_Wave_Caster = No unit
        • Custom script: call RemoveLocation (udg_Triple_Fire_Wave_Point[0])
      • Else - Actions
        • Set Triple_Fire_Wave_Time = (Triple_Fire_Wave_Time + 1)
        • Set Triple_Fire_Wave_Loop = (Triple_Fire_Wave_Loop + (5.00 + (3.00 x (Real((Level of Triple Fire Wave for Triple_Fire_Wave_Caster))))))
        • For each (Integer A) from 1 to 3, do (Actions)
          • Loop - Actions
            • Set Triple_Fire_Wave_Point[(Integer A)] = (Triple_Fire_Wave_Point[0] offset by Triple_Fire_Wave_Loop towards ((Triple_Fire_Wave_Angle - 60.00) + ((Real((Integer A))) x 30.00)) degrees)
            • Special Effect - Create a special effect at Triple_Fire_Wave_Point[(Integer A)] using Abilities\Spells\Items\AIfb\AIfbSpecialArt.mdl
            • Special Effect - Destroy (Last created special effect)
            • Set Triple_Fire_Wave_UGroup = (Units within 150.00 of Triple_Fire_Wave_Point[(Integer A)] matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of Triple_Fire_Wave_Caster)) Equal to True)))
        • Unit Group - Pick every unit in Triple_Fire_Wave_UGroup and do (Actions)
          • Loop - Actions
            • Unit - Cause Triple_Fire_Wave_Caster to damage (Picked unit), dealing (((Real((Level of Triple Fire Wave for Triple_Fire_Wave_Caster))) x (Real((Level of Triple Fire Wave for Triple_Fire_Wave_Caster)))) x 2.00) damage of attack type Spells and damage type Normal
  • Custom script: call RemoveLocation (udg_Triple_Fire_Wave_Point[GetForLoopIndexA()])
  • Custom script: call DestroyGroup(udg_Triple_Fire_Wave_UGroup)
I hope I reconstruct this trigger correctly [ but agree to rainshow use the tags.

Now as I look over the trigger I don't see leaks - but I don't know if it is MUI. The trigger is very fast 0.02 seconds * 50 - but if 2 Players cast it at the same time....
 
Status
Not open for further replies.
Top