HELP! Adding separate blockly events in one script

#1

I am trying to create a 3D environment of the ocean biome, where I have multiple instances of marine life, all using paths for movement.

So far, I’ve had to create separate CoBlocks for each animal’s path, with the logic reading as such:

When play is clicked

Forever

move “animal” along path “X”

This works well, but I have run out of the allowed number of CoScripts I can create and now I cannot figure out how to combine these path movements into one CoBlock. If I attempt to add a second animal in, it will not move due to the previous coding using the ‘forever’ block.

Please help!

#2

Hi @Andrea_Carovillano,

For cases where a forever - CoBlock stops code, you can use the run parallel - CoBlock to have multiple actions happen at the same time. Here’s an example of 4 forever - loops being added to the run parallel block.

Hope this helps!

#3

This was perfect!! Thanks so much.

1 Like