• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

loop without wait

Status
Not open for further replies.
Level 7
Joined
Aug 19, 2009
Messages
278
Will a loop without wait lagg

e.g

loop
exitwhen udg_x <= 10
end loop

Will this thing lag?
udg_x in a integer whose value could be 10 in a time ~ 5 seconds or so.


another question
Without a wait in how much time interval does a loop worlk
 
Level 7
Joined
Aug 19, 2009
Messages
278
Depends on what you're doing inside the loop. But generally speaking, loops without waits won't lag unless you're doing really intensive work.
Without wait actions, the loop is finished instantly.

Well there is just a comparison in it


JASS:
local integer con = 0
loop
if( udg_x > 1) then
.........actions..................
con = con + 1
endif
exitwhen c >= 3
endloop

what about this thing?
 
Level 7
Joined
Aug 19, 2009
Messages
278
Sry to bump
but i need just a yes or no answer will this lag

JASS:
local integer con = 0
loop
if( udg_x > 1) then
.........actions..................
con = con + 1
endif
exitwhen c >= 3
endloop
 
Level 5
Joined
Oct 14, 2010
Messages
100
Sry to bump
but i need just a yes or no answer will this lag

JASS:
local integer con = 0
loop
if( udg_x > 1) then
.........actions..................
con = con + 1
endif
exitwhen c >= 3
endloop

Couple of questions:
what is c? If c isn't initialized, or never updated, exitwhen c >= 3 won't ever happen...
And then again, without knowing ...actions... I can't really tell whether it'll lag. But if it's a simple comparison, it probably won't lag. But the best way to find out is to test it.
 
Status
Not open for further replies.
Top