- Joined
- Sep 5, 2007
- Messages
- 264
I don't know if anyone else has done this, so I'm sorry if I haven't seen it.
I've found a way to get around that annoying "operations" limit with triggers and functions, the limit that stops a function dead in its tracks as soon as it hits it. It does create an extra temporary trigger though.
In JASS you can just use:
I know that this probably isn't the most efficient way to do things, but it's about the only way I've found, and I've spent a fair bit of time trying other ways.
The main reason people would use this is when handling/creating a large amount of objects (in my case, destructables) where it is VERY easy to hit that annoying ~8000 executions limit...
EDIT: There is a limit on how many of these that you can do... I just tried putting about 15 off one trigger and WC3 won't load the map, so I'll investigate further.
I hope this helps...
I've found a way to get around that annoying "operations" limit with triggers and functions, the limit that stops a function dead in its tracks as soon as it hits it. It does create an extra temporary trigger though.
In JASS you can just use:
JASS:
function DoLotsMoreExecutions takes nothing returns nothing
local trigger trig = GetTriggeringTrigger()
call TriggerClearActions(trig)
call DestroyTrigger(trig)
set trig = null
... <more code that misses the limit>
endfunction
function DoLotsOfExecutions takes nothing returns nothing
local trigger trig
... <other code that just misses the limit>
set trig = CreateTrigger()
call TriggerAddAction(trig, function <DoLotsMoreExecutions>)
call TriggerExecute(trig)
set trig = null
endfunction
I know that this probably isn't the most efficient way to do things, but it's about the only way I've found, and I've spent a fair bit of time trying other ways.
The main reason people would use this is when handling/creating a large amount of objects (in my case, destructables) where it is VERY easy to hit that annoying ~8000 executions limit...
EDIT: There is a limit on how many of these that you can do... I just tried putting about 15 off one trigger and WC3 won't load the map, so I'll investigate further.
I hope this helps...
Last edited: