goto – Talk

From Bohemia Interactive Community
Jump to navigation Jump to search
(Delay in a loop)
Line 19: Line 19:


Unless you really want the loop to execute multiple times during a frame, you should include a small delay.
Unless you really want the loop to execute multiple times during a frame, you should include a small delay.
--[[User:Suma|Suma]] 12:19, 23 May 2006 (CEST)

Revision as of 12:19, 23 May 2006

Ok......lets get this clear.

I have always thought that a loop, in most cases, MUST have a delay of some sort, otherwise the loop loops so fast that you cannot interrupt it and end up having to reboot or quit the game.

Lets have the nitty gritty here.

Also, are Label names case sensitive or not, give reasons , evidence.........etc.


Planck


raedor: From what I know they're not case sensitive, I've been using them for years without problems. About the delay: it is correct that you should have delays in your loops, especially "infinite" loops (eg with alive x as condition), as slower computers will CTD without that delay. Also you should think about the length of the delay if you're addon-scripting, because you have to face the fact that your scripts might run 20 times at once. I think it's an interesting fact here, that @ and triggers check with .5 delays.

Delay in a loop

While it is not required to include delay in a loop, loop without a delay can cause the script to slow down the game a lot, as the loop will be executed many times before game engine interruprts the script.

Unless you really want the loop to execute multiple times during a frame, you should include a small delay.

--Suma 12:19, 23 May 2006 (CEST)