Major lagging from leaks

Venge22

New Member
Reaction score
10
Hey, my map keeps lagging because it leaks from spawning footmen every 3 secs or so. How do i fix this lag?

Here is the trigger:

JASS:
function Trig_Untitled_Trigger_001_Func001002 takes nothing returns nothing
    call GroupPointOrderLocBJ( GetUnitsInRectAll(gg_rct_elemental), "attack", GetRectCenter(gg_rct_middle) )
endfunction

function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    call ForGroupBJ( GetUnitsInRectAll(GetPlayableMapRect()), function Trig_Untitled_Trigger_001_Func001002 )
    call CreateNUnitsAtLocFacingLocBJ( 1, 'hfoo', Player(5), GetRandomLocInRect(gg_rct_elemental), GetRandomLocInRect(gg_rct_elemental) )
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_001 = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Untitled_Trigger_001, 2 )
    call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction
 

Romek

Super Moderator
Reaction score
963
Is there any particular reason why you converted your trigger to Jass?
It's not like you fixed anything...

Read Me
 

Venge22

New Member
Reaction score
10
I did that because this guy told me to so it would be easier to stop the leaks.

Oh also im stupid and dont have TfT and i got RoC. Can u put custom scripts in RoC?
 

Romek

Super Moderator
Reaction score
963
I seriously suggest you get TFT.

And no, you can't use Custom Script in RoC.
Which is a real pain for you if you don't understand Jass. (What if you wanted to edit the trigger)

Leaks:
- GetUnitsInRectAll(gg_rct_elemental)
- GetRectCenter(gg_rct_middle)
- GetUnitsInRectAll(GetPlayableMapRect())
- GetRandomLocInRect(gg_rct_elemental) (x2)
 
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