Hello,
Is it possible to code in CoBlocks to make an object stop or execute an action when it reaches a certain node ID on a path? I know it can be done in script, but how about in CoBlocks? I have been searching for a way for quite a while and have not yet been able to figure it out.
Thanks for any help!
Hi @Tom_Ansuini1,
A good question, and I’m happy to say the answer is “Yes, you can!”. Every Path node has an ID (double-click to find in Code), so you can use this with the Items > Get Item block to set up a collision event.
Here’s a remixable example:
Hope this helps! Let me know if you have any further questions about this. If this resolves your issue, please mark this post as the Solution.
Many thanks,
Geoff @ TechLeap
1 Like
Hi Geoff @techleapnz !
This is awesome. How might I then have my “bus” continue on the path after stopping at a node. Let’s say for example, when the traffic light turns green, the bus continues moving along the path from where it stopped?
Thanks so much!
@Ashley_Boivin Just run the move on path code again. I’ve updated the code to show one solution to what you’ve described.