Posted By
|
Message
|
Chris Burrows
Registered 14/09/2002
Points 2396
|
14th November, 2011 at 11:18:49 -
Is it possible to slow down fast loops?
How ever many times you run a fast loop, it is happens instantly in 1 MMF frame.
Is it possible to slow this down so for example 50 loops happen in 10 frames (instead of 1)?
n/a
|
nivram
Registered 20/07/2006
Points 171
|
14th November, 2011 at 16:51:11 -
Chris. Jamie has an answer for you on the Clickteam Forums.
Marv
458 MMF2 & CTF 2.5 examples and games
http://www.castles-of-britain.com/mmf2examples.htm
|
Avantar1975
Registered 01/12/2011
Points 39
|
7th December, 2011 at 17:24:01 -
A couple of days ago, I had the same thought. What helped me was to understand fastloops better. Remember that if a fastloop runs x times, the loop will have to finish before it moves on to the next line. About 317460317 loops will roughly equal to 10 seconds delay before it moves on to the next line. You can have as many "on loop" events as you want too. Just another reminder: MMF loops in itself, going through each line of code, but a bit slower than a fastloop.
So for instance: I had a loop that writes and saves to an ini file(no issue with speed), but then i wanted to retrieve some info from the web of all the text that was added in the ini - so I wanted to loop through them, but using the fast loops was just too fast...lol. Instead I just made grouped events in MMF with flags for conditions. like: start of frame get url="text from first line of ini", Has the website been retrieved, then set some flag on, If the flag is on, move to the next condition. Shoulsd the flag be off, do all the events again from group "x" starting with the next line, by setting the flag to off. [So this is not actual coding but just the logical wording to it.]
I hope this helped - maybe you do not need a fastloop, but just using the natural looping that MMF already does - you know when you set an event to Always do "this" when a condition is true, it makes logical sense that MMF in itself needs to check the events constantly.
n/a
|
|
|