HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Loop Triggers?

06-27-2005, 07:44 AM#1
Ignitedstar
I have a few questions for looping triggers.

If activated at any given time, does the trigger keep on looping infinitely? And if it does, how do you stop it?

Also, would turning on more then one loop trigger create a lot of lag?

Rep. will be my appreciation to whoever can answer. Thanks in advance.
06-27-2005, 08:14 AM#2
Guest
Quote:
If activated at any given time, does the trigger keep on looping infinitely? And if it does, how do you stop it?
I believe it just loops till u tell it to quit. exitwhen()
Quote:
Also, would turning on more then one loop trigger create a lot of lag?
It depends on what's in the triggers and if you wait inside the loop function
06-27-2005, 08:15 AM#3
EdwardSwolenToe
Loops do loop infinitly (or near enough, nothing is infinite ^^) until the exitwhen condition is met.

Blizzard's loops work like

Code:
loop
exitwhen bj_integer_a > bj_integer_a_end
set a = a+1
endloop

(note bJ_integer_a and that arent exact because i cant be bothered to get WE open, but its near enough.

When you set a = 1 and end = 5 it will loop until a is greate than 5.

Or it could be like:

Code:
loop
exitwhen unit == dead
endloop

Untill the condition is met, it will keep looping. Although having no exitwhen would probobly crash the game!

Having multiple loops doesnt really lag the game, its whats in those loops that generally cause lag.
06-27-2005, 08:19 AM#4
Guest
You nailed it Ed. I was way off :P