I can't find the leak

Legacyspy

New Member
Reaction score
19
I am think one of these two triggers are leaking, as the map starts to lag alot after I use the ability alot.
Code:
MultiShot
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Ranger 1 2 Multi Shot 
    Actions
        Set PhysPoint1 = (Position of (Casting unit))
        Set PhysPoint2 = (Target point of ability being cast)
        Set ShotAngle = (Angle from PhysPoint1 to PhysPoint2)
        Set MaxAngle = ((Distance between PhysPoint1 and PhysPoint2) / 15.00)
        Set MaxAngle = (90.00 - MaxAngle)
        Unit - Create 1 Multi Shot for (Owner of (Casting unit)) at PhysPoint1 facing PhysPoint2
        Unit Group - Add (Last created unit) to MarksMissileGroup
        Unit - Add a (0.75 + 0.00) second Generic expiration timer to (Last created unit)
        Custom script:   call RemoveLocation(udg_PhysPoint2)
        For each (Integer A) from 1 to MaxShot, do (Actions)
            Loop - Actions
                Set PhysPoint2 = (PhysPoint1 offset by 600.00 towards (((MaxAngle x (1.00 x (Real((Integer A))))) / (Real(MaxShot))) + ShotAngle) degrees)
                Unit - Create 1 Multi Shot for (Owner of (Casting unit)) at PhysPoint1 facing PhysPoint2
                Unit Group - Add (Last created unit) to MarksMissileGroup
                Unit - Add a (1.25 + 0.00) second Generic expiration timer to (Last created unit)
                Custom script:   call RemoveLocation(udg_PhysPoint2)
        For each (Integer A) from 1 to MaxShot, do (Actions)
            Loop - Actions
                Set PhysPoint2 = (PhysPoint1 offset by 600.00 towards (((MaxAngle x (-1.00 x (Real((Integer A))))) / (Real(MaxShot))) + ShotAngle) degrees)
                Unit - Create 1 Multi Shot for (Owner of (Casting unit)) at PhysPoint1 facing PhysPoint2
                Unit Group - Add (Last created unit) to MarksMissileGroup
                Unit - Add a (1.25 + 0.00) second Generic expiration timer to (Last created unit)
                Custom script:   call RemoveLocation(udg_PhysPoint2)
        Trigger - Turn on MoveRangerMissile <gen>
        Custom script:   call RemoveLocation(udg_PhysPoint1)

Code:
MoveRangerMissile
    Events
        Time - Every 0.03 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in MarksMissileGroup and do (Actions)
            Loop - Actions
                Set PhysPoint1 = (Position of (Picked unit))
                Set PhysPoint2 = (PhysPoint1 offset by 25.00 towards (Facing of (Picked unit)) degrees)
                Unit - Move (Picked unit) instantly to PhysPoint2, facing (Facing of (Picked unit)) degrees
                Set PlasmaPlayer = (Owner of (Picked unit))
                Set RangerMissile = (Picked unit)
                Set RangerMissileTargetGroup = (Units within 75.00 of PhysPoint2 matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True)) and ((((Owner of (Matching unit)) is an enemy of PlasmaPlayer) Equal to True) and (((Matching unit) is alive) Equal 
                Unit Group - Pick every unit in RangerMissileTargetGroup and do (Actions)
                    Loop - Actions
                        Unit - Cause Heroes[(Player number of PlasmaPlayer)] to damage (Picked unit), dealing ((Real((Agility of Heroes[(Player number of PlasmaPlayer)] (Include bonuses)))) / 4.00) damage of attack type Spells and damage type Normal
                Custom script:   call DestroyGroup (udg_RangerMissileTargetGroup)
                Custom script:   call RemoveLocation(udg_PhysPoint1)
                Custom script:   call RemoveLocation(udg_PhysPoint2)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in MarksMissileGroup) Equal to 0
            Then - Actions
                Trigger - Turn off (This trigger)
            Else - Actions
 

Moridin

Snow Leopard
Reaction score
144
I can't see any leaks...are you sure these are the only triggers affecting the lag? Maybe it's something that just lags your map after a while of playtime?
 

HydraRancher

Truth begins in lies
Reaction score
197
Are you sure its a leak? Maybe its simply lag. Also, put it in [noparse]
Trigger:
[/noparse] tags, "I got blisters on me eyelids!!"
 

Legacyspy

New Member
Reaction score
19
The map it self is just for testing things, and I don't see a way any of the other triggers could interact with it, so it might just be regular lag due to the ability its self.

Thanks.
 

HydraRancher

Truth begins in lies
Reaction score
197
The map it self is just for testing things, and I don't see a way any of the other triggers could interact with it, so it might just be regular lag due to the ability its self.

Thanks.

Cast it 5 times, wait 30 seconds and view the result.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top