The Daily Click ::. Forums ::. Klik Coding Help ::. Simple (?) question about loops
 

Post Reply  Post Oekaki 
 

Posted By Message

Robbert



Registered
  19/06/2003
Points
  420
19th March, 2006 at 18:20:30 -

I have a mainloop which starts a subloop:

- On loop "mainloop":
start loop "subloop"

I want "mainloop" to go further if "subloop" is finished. How can I achieve this?

 
Hey mates, I'm Iglo yeah =P!

Robbert



Registered
  19/06/2003
Points
  420
19th March, 2006 at 18:21:16 -

I mean mainloop has to wait before it goes to the next step until subloop is finished.

 
Hey mates, I'm Iglo yeah =P!

Robbert



Registered
  19/06/2003
Points
  420
19th March, 2006 at 18:54:39 -

Yes exactly that

 
Hey mates, I'm Iglo yeah =P!

Robbert



Registered
  19/06/2003
Points
  420
19th March, 2006 at 19:17:52 -

Thanks. I didn't know that.

 
Hey mates, I'm Iglo yeah =P!

Robbert



Registered
  19/06/2003
Points
  420
19th March, 2006 at 19:49:43 -

So how many levels of loops can be embedded?

I have a mainloop that starts a subloop
and the subloop start a subsubloop

Is it garanteed that MMF will first finish subsubloop and subloop before going back to mainloop?

mainloop { subloop { subsubloop } }

Like this?

 
Hey mates, I'm Iglo yeah =P!

Joe.H

Evil Faker

Registered
  19/08/2002
Points
  3305
19th March, 2006 at 19:54:48 -

theoretically it can go to any depth as long as it has a way of returning to the end (i.e dont do:
loop 'main loop'

loop 'sub loop'
loop'sub sub loop'
loop 'sub loop'
)
as this will jsut make it loop infinately

but MMF'd probably crash if you go too deep

 
My signature is never too big!!!

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
19th March, 2006 at 19:56:04 -

Of course it will work. There arn't limitations of how many, well not any you will need to worry about

 
n/a

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
19th March, 2006 at 21:08:40 -

I think if you nest too many loops the computer doesn't have enough time to do it all at once, resulting in the previous loop continuing without the subloop even having finished. I think.

 
Old member (~2004-2007).

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
19th March, 2006 at 21:51:46 -

Ah. Smart!

 
Old member (~2004-2007).

Robbert



Registered
  19/06/2003
Points
  420
20th March, 2006 at 09:00:04 -

Well. I only need 3 loops that are embedded into each other.

And they are at the start of the frame. I guess that's not a big deal, is it?

 
Hey mates, I'm Iglo yeah =P!
   

Post Reply



 



Advertisement

Worth A Click