Wow! Thanks guys for helping out. Appreciated it a lot. But I'm still not sure about something:
Every *
marks a new question
*
Additionally, TriggerSleepAction causes net traffic so running a hundred of them at once will result in lag.
-So, what should I replace them with?
*
-
Some Trigger
-
Events
-
Time - Every 5.00 seconds of game time
-
Conditions
-
Actions
-I know this causes lag if there's too many of this event running at the same time (correct me if I'm wrong). So, how many of this event can I have at most?
-If a map requires a lot of 'Every 5.00 seconds of game time' check, what should I do? Does this event:
-
Some Trigger
-
Events
-
Conditions
-
Actions
causes less lag than 'Every 5.00 seconds of game time' event? If So, how many of 'Timer Expires' event can I have at most? If not, what do I use to replace those events?
-Does the duration of the interval affect the map's performance too?
*
-
Some Trigger
-
Events
-
Conditions
-
Actions
-
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
-I used this in my map to check the number of enemy units alive. If the number of enemy units alive is more than the 50, then it will remove random 5 enemy units. At the beginning of the game, it seems fine, no lag. But, when nearing the end, the game started to lag (short period of lags) every 5-10 seconds. I was wondering if this causes the lag and if it does, what should I do to the trigger to lessen the lag?
-Does '(Units in (Playable map area))' affect the map's performance too? If i use '(Units in (Playable map area))', will it cause more lag than 'Units owned by Player 1 (Red))'
-
JASS:
set a = GetUnitsInRectAll(GetPlayableMapRect())
set b = FirstOfGroup(a)
loop
exitwhen b == null
(Actions)
set b = null
set b = FirstOfGroup(a)
endloop
Does the script above causes lag too?
*
-
Some Trigger
-
Events
-
Unit - A unit Dies/A unit Finishes construction/A unit Starts the effects of an ability/A unit Is attacked/......
-
Conditions
-
Actions
-I was wondering if I have 10 triggers with this event, will it lag too? If yes, should I merge all the triggers into one and use this event once only? But what if, the actions and conditions are very complex (as in a lot of actions and conditions). Will it slow down the performance too?
Thanks for the help. I will truely, really, eternally appreciate all the help.
And 1 more stupid question.....how do you + other user's rep? XD
Oh....and it took me 1 hour to finish this post....hahaha how silly....