• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

LAGs by Triggers

Status
Not open for further replies.
Level 3
Joined
Nov 4, 2006
Messages
32
I have used "unit group - pick" actions so much, and my map is laggy with only 20 units. How i can optimize picking?

For example, i pick every units of MainHeroType (max 10 hero units on the map) and if inventory contains special combination, then action replacing items. This picking starts on event every 0.20 seconds.

p.s. cannot use aquiring item event, because i need spy combination every time and slots are very important.

And PLEASE, post any information about laggy actions, events etc. because Blizzard programmists actually dont use optimization for fast triggering.
 
Level 3
Joined
Nov 4, 2006
Messages
32
and what will this do? i do not understand pick action system correctly - so laggy with my computer... please tell me WHY this action so laggy. may be every picked group saves in the memory?

set bj_wantDestroyGroup = true - why this action will improve compution speed?
 
Level 3
Joined
Nov 4, 2006
Messages
32
set bj_wantDestroyGroup = true helps me, but not fully. map have lag, but too many :)

Events
Time - Every 0.20 seconds of game time
Actions
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units of type MainHeroType) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
...


can i optimize this code? I need to pick every MainHeroType when any item aquired or swapped between inventory slots. But have no event for swap between slots detect, and in this case timer periodic event is optimally now :(
 
Status
Not open for further replies.
Top