Posted By
|
Message
|
Hagar Administrator
Old klik fart
Registered 20/02/2002
Points 1692
|
20th June, 2011 at 15:10:47 -
Hi everyone,
I need to use a loop to perform what would be like a C function, but I only want to call this loop if the active object has one of its flags set.
So far I am using the ForEach extension, and it's doing a grand job I must add. Anyhow I have the foreach extension looping through all the objects, checking the fixed values against the foreach's loop iteration fixed value ( LoopFV ) and then checking the flag. If the flag is set call a conventional fastloop for as many times as needed, but only for the objects that need this algorithm.
I thought I had a solution, but it does nothing - what is the proper way of doing this?
p.s. Just checking out the Function Loop object, hoping it does what I want
n/a
|
Sketchy Cornwall UK
Registered 06/11/2004
Points 1970
|
20th June, 2011 at 15:37:30 -
You could do something like this:
+ Whenever...
-> Start ForEach Loop: "Loop1" for object "Object"
+ On ForEach loop: "Loop1" for object "Object"
+ Object: Flag is ON
-> Start fastloop "Loop2" however many times...
+ On loop "Loop2"
+ Object: Fixed value = LoopFV, "Loop1"
-> Do whatever...
Or you may not even have to do it one object at a time (depending on what your fastloop does).
eg.
+ Whenever...
-> Start fastloop "Loop2" however many times...
+ On loop "Loop2"
+ Object: Flag is ON
-> Do whatever...
Edited by Sketchy
n/a
|
Hagar Administrator
Old klik fart
Registered 20/02/2002
Points 1692
|
20th June, 2011 at 16:55:00 -
Cheers Sketchy I shall try it out when I get back home .
n/a
|
Hagar Administrator
Old klik fart
Registered 20/02/2002
Points 1692
|
21st June, 2011 at 13:42:37 -
Cheers Sketchy - barring some minor bugs (on my behalf) the code is working
Edited by an Administrator
n/a
|
|
|