- This topic has 6 replies, 4 voices, and was last updated 3 years, 10 months ago by
xeon.
-
AuthorPosts
-
2021-11-27 at 10:19 am #47286
grimmy
CustomerI tried creating a loop and adding a ‘continue next iteration; within an ‘after 1 second’ statement but it seems the continue statement doesn’t work this way. Any ideas?
Cheers
2021-11-29 at 6:03 am #47312
Yuri KovelenovStaffyou might use this puzzle that basically wraps JavaScript’s setInterval method https://www.soft8soft.com/docs/manual/en/puzzles/Time.html#every
2021-11-29 at 4:08 pm #47343grimmy
CustomerI tried using that in a loop but it didnt seem to work. I get an error when I put the ‘continue to next iteration’ puzzle inside the every x seconds puzles (which in turn is inside the loop.)
2021-12-03 at 2:46 pm #47556grimmy
CustomerFor example..this gives me the error: Uncaught SyntaxError: Illegal continue statement: no surrounding iteration statement
Same if I use the ‘every’ puzzle.
Attachments:
2021-12-07 at 2:15 pm #47717grimmy
CustomerAny word on this?
2021-12-08 at 2:06 pm #47761
Mikhail LuzyaninStaffCan you share the project with this piece, difficult to understand what you try to achieve with only few puzzles on screenshot.
Co-founder and lead graphics specialist at Soft8Soft.
2021-12-08 at 5:59 pm #47777
xeonCustomerWithout knowing exactly what you are trying to do I can only give you generic advice.
Some basic testing will show that the loop approach you have taken will not work.
Create a basic scene with two objects. I chose an icosphere and a cube.
Using the logic with a timer inside a loop will not work as you might think. The after 1 second…means that after 1 second…you will continue to next itteration. That means after 1.1 seconds..it will automatically continue but before 1 second it will hold and wait.
The timer is NOT unique to the iteration but unique to the project as a whole.You might be more successful using a set timer with an interval of 1 second and a repeat of 3.
There are other approaches depending on the memory requirements of the loop and lots of testing to validate if you should execute the loop or if the prior loop is done before firing the next. All of that is dependent on your project.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com -
AuthorPosts
- You must be logged in to reply to this topic.



