Hello,
I’ve made a Micro Library and made there a For Each Loop With Break And Delay Function.
It’s image is attached.
For some reason it prints “COMPLITED1” but never prints “COMPLITED2”.
This loop is inside another loop without a delay, probably this is a reason why it doesn’t work propery?
Thank you in advance for your advices.
PS: Sorry for the quality of the image, don’t know why it is so.
Try removing the print string, I’m assuming the game is reading the break multiple times and counting it maybe as a inf loop for some reason. If there is a delay in it theres prolly a reason why there is or isnt. Dont tweek it try and make a new one if you want a different result or use it with other components to do get the same result.
Seems like the root of the problem. Does delay work with just simple For Loops? I believe you see that it is a Micro Library, as far as I know Delay should work there, shouldn’t?
You can fix this by creating a modified version of the For Each Loop with Break macro where you control when it iterates. Whether that is a triggering event, or whenever X cycles of the loop completes.
I did this in my personal library a while back to give myself control doing Animated effects and things for documentation / effects / training. It has also been nice for splitting large amounts of work between multiple frames.
Note: I remove the “Sequence” node at the end and turn it into an “Iteration” input on the macro itself. So now you can put delays in the “Loop Body” and iterate it whenever you’re ready to (including on an input key for live demos / presentations).