Game crashes when slug goes downward

I have a slug enemy that sticks to the walls, it works the same way for each direction, but only breaks when turning downward. I know its entering an infinite loop and crashing but I can’t figure out why. It happens on level 2. A simpler/better way to achieve this motion would be helpful as well.
Screenshot 2024-04-16 121520

let me check your code, are you trying to figure out where the loop is happening?(making it crash)

Soooooooo ummm well, I am having an amazingly hard time finding the loop, I’m terrible at that unless I design the code. SO I have this idea instead, try making a block that has 0 alpha and its properties are these
Screenshot 2024-04-16 9.06.40 PM
and place it where the snail turns to go down, top right corner of the structure, and then in the snail code try this


delete the “down switch” and replace it with a collision (to the new block you just made), and the collision to only a effect “RIGHT” and then change the number to 90 degrees, let me know if that works

That is a really good idea but the way you did it doesn’t fully work, with a little time I could definitely make this method work though. Since it is hard to find an extra or missing line in this spaghetti of code, I am going to recreate the slug and see if I get the same issue. If it still doesn’t work I will use your idea. Thanks for your help!

1 Like

no problem, yea I really only took 5 minutes to whip up that, sorry about that. Hope ur game comes out nice! :grin: :+1: