Help with Integer A loop lag

darth_ilidan

New Member
Reaction score
0
I made this trigger

event
-A dialog button is clicked for dialog
conditions
-(Clicked dialog button) equal to DialogButton[1]
actions
-Set ScourgeHeroesNormal[1] = Deeplord
-Set ScourgeHeroesNormal[2] = Undead Warrior
-Set ScourgeHeroesNormal[3] = Fire Lord
-Set ScourgeHeroesNormal[4] = Fallen Warrior
-Set ScourgeHeroesNormal[5] = Crypt Lord
-Set ScourgeHeroesNormal[6] = Assasin
-Set ScourgeHeroesNormal[7] = Death Knight
-Set ScourgeHeroesNormal[8] = Lich
-Set ScourgeHeroesNormal[9] = Weapon Master
-For each (Integer A) from 1 to 9, do (Actions)
--Set Point_temp = ((Center of sPit <gen>) offset by 200.00 towards
((Real((Integer A))) x 40.00 deegres.
--Unit - Create 1 ScourgeHeroesNormal[(IntegerA)] for Player12 (Brown)
at Point_temp facing (Center of sPit <gen>)
--Unit - Pause (Last Created Unit)
--Unit - Make (Las Created Unit) Invulnerable
--Custom Script: call RemoveLocation (udg_Point_temp)
-Dialog - Clear Dialog
-Dialog - Hide Dialog for Player 1

This trigger is runned 2 times in different places at the same time, and it works fine but it lags, nybody knows a way to fix the lag?
 

CaptDeath

New Member
Reaction score
103
add some waits cause thats
56 actions and your comp is literrally doing as fast as it can just add .5 second waits should clear up your lag
 

CaptDeath

New Member
Reaction score
103
oh yeah an easy way to get ride of that is have them in a coner of the map and killed on map ini or shortly after
 

vypur85

Hibernate
Reaction score
803
In fact, just create the unit and remove it, that's all. This, if, what Chocobo guessed is right. Else, I don't really see the laggy stuff in the trigger.

Code:
Event
 Map Init
Condition
Actions
 Unit - Create 1 ScourgeHeroesNormal[(IntegerA)] for Player12 (Brown)
at Point_temp facing (Center of sPit <gen>)
 Unit - Remove (Last created unit)
 

darth_ilidan

New Member
Reaction score
0
well yes is the first time they are created and dude i dont want to remove them i need those heroes created
 

CaptDeath

New Member
Reaction score
103
>.< its called a preload wc3 loads a unit for the first time it lagz so if you preload them= less lag
 

Light Alkmst

New Member
Reaction score
20
What they mean for making them and killing them, doesn't mean permanently. What they mean is this:

Make the units somewhere people won't see
Remove those units
Make the units you want
Use the units

This is all assuming you don't just create and use them all at the very beginning anyways, in which case there's not much you can do AFAIK.
 

darth_ilidan

New Member
Reaction score
0
Its fixed, thank you very much for your help, i made all heroes too be in the map so they get loaded in loading scren and then i removed them at map initialization.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top