Using collision with lists

#1

I’m having trouble using collision with list items. Is my code wrong or is it a limitation of CoBlocks? The disabled code in this scene works but it would be much more efficient to use a list. https://cospac.es/9yUe

Thanks!

#3

Hi @MBridges,

You were getting close to the solution! In order to set events on multiple items at once, you want to iterate through the list with the for each - block, and use a function with parameter to make sure that an event-handler is created for every checkpoint in the list.

Below you can find a remixable space with working code. Feel free to check it out to see how the CoBlock was adjusted to make it all work :slight_smile:

1 Like
#4

Thank you, Stefan! I knew there was a way!