Does this leak? |AND| Question about abilities

Deep thought

New Member
Reaction score
1
I have a trigger that I think is leaking, but I cannot figure out why. Help?

Trigger:
  • BulletMovers
    • Events
      • Time - Every 0.06 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 0 to 160, do (Actions)
        • Loop - Actions
          • Set Bullet_Point[(Integer A)] = (Position of Bullets_Units[(Integer A)])
          • Set Bullet_Point_Offset[(Integer A)] = (Bullet_Point[(Integer A)] offset by 40.00 towards Bullet_Angle[(Integer A)] degrees)
          • Unit - Move Bullets_Units[(Integer A)] instantly to Bullet_Point_Offset[(Integer A)]
          • Unit - Move Bullets_Units_Checkers[(Integer A)] instantly to Bullet_Point_Offset[(Integer A)]
          • Set Bullet_LeakUnitGroup[(Integer A)] = (Units within 40.00 of Bullet_Point_Offset[(Integer A)] matching (((((Matching unit) is A flying unit) Equal to False) and ((Owner of (Matching unit)) Equal to Bullet_CastingPlayer[(Integer A)])) and (((Unit-type of (Matching unit)) Equal to Bullet) and ((Uni
          • Unit Group - Pick every unit in Bullet_LeakUnitGroup[(Integer A)] and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in Bullet_LeakUnitGroup[(Integer A)]) Greater than 0
                • Then - Actions
                  • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 50.00)
                  • Set Bullet_DebugUnit = (Last created unit)
                  • Unit - Remove Bullets_Units[(Integer A)] from the game
                  • Unit - Remove Bullets_Units_Checkers[(Integer A)] from the game
                  • Set Bullets_SeekerUnits[(Player number of Bullet_CastingPlayer[(Integer A)])] = (Picked unit)
                  • Set Bullet_IsAlive[(Integer A)] = False
                • Else - Actions
          • Custom script: call DestroyGroup(udg_Bullet_LeakUnitGroup[GetForLoopIndexA()])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Bullets_Units[(Integer A)] Equal to No unit
            • Then - Actions
              • Set Bullet_LeakUnitGroup[(Integer A)] = (Units within 50.00 of Bullet_Point_Offset[(Integer A)] matching ((Unit-type of (Matching unit)) Equal to Bullet))
              • Unit Group - Pick every unit in Bullet_LeakUnitGroup[(Integer A)] and do (Actions)
                • Loop - Actions
                  • Unit - Remove (Picked unit) from the game
              • Custom script: call DestroyGroup(udg_Bullet_LeakUnitGroup[GetForLoopIndexA()])
              • Set Bullet_LeakUnitGroup[(Integer A)] = (Units within 50.00 of Bullet_Point_Offset[(Integer A)] matching ((Unit-type of (Matching unit)) Equal to Bullet Collision Checker))
              • Unit Group - Pick every unit in Bullet_LeakUnitGroup[(Integer A)] and do (Actions)
                • Loop - Actions
                  • Unit - Remove (Picked unit) from the game
              • Custom script: call DestroyGroup(udg_Bullet_LeakUnitGroup[GetForLoopIndexA()])
            • Else - Actions
          • Set Bullet_Point_Offset_Checker[(Integer A)] = (Position of Bullets_Units_Checkers[(Integer A)])
          • Custom script: call RemoveLocation (udg_Bullet_Point[GetForLoopIndexA()])
          • Custom script: call RemoveLocation (udg_Bullet_Point_Offset[GetForLoopIndexA()])
          • Custom script: call RemoveLocation (udg_Bullet_Point_Offset_Checker[GetForLoopIndexA()])



Also, is it possible to make an ability not interrupt the units current action, like, for example, walking?
 
1. Why would you believe it's leaking ?
Because it lags ? :S

If so, then don't you think moving 161 units every 0.06 seconds could cause some lag too ? :S

Also, what is this actions for:
Trigger:
  • Set Bullet_Point_Offset_Checker[(Integer A)] = (Position of Bullets_Units_Checkers[(Integer A)])


Set a variable to something just to destroy it right after ? :S

And no there are no leaks here...
 
For your second question, there is abilities usable without stopping the unit from walking (wind walk, scroll of the beast)

You could take, for example, the scroll of the beast spell, remove all effects, then trigger from there.
 
You could take, for example, the scroll of the beast spell, remove all effects, then trigger from there.
Yep berserk works too...

Btw can you give more description on what the spell does. Maybe we can find another way to make it so it wouldn't lag.
 
I figured out how to fix the lag. Thanks for all the advice about the abilities though, I'll be sure to try them.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top