help my enemy move backwards and forwards without sticking!

Everytime I try and get the enemy to move between to blocks it moves one way fine but will not return and continue moving. What am I doing wrong/missing?

http://flowlab.io/game/view/342810

I had this problem too- one day it’s fine, then after that it sticks. I guess when it flips and goes the other direction it is still touching the wall and flips back

I think I may have solved your problem. When the enemy flips, for a quick second there is a collision that re-engages the toggle.

Send the ‘out’ of ‘toggle’ into the ‘in’ of your ‘number’ 3 for velocity. It gives it an initial velocity that bypasses that quick toggle.

Let me know if that works for you :slight_smile:

top work Steeph323 that worked a treat. Many thanks

Very clever workaround Steeph323! You are exactly right about the problem.

I have a B.S. in Computer Science, and since I’m not using as a job it might as well come in handy in the Flowlab forums :slight_smile:

Hello, I had a question – how do you have your tank ‘shoot’ when you press the left mouse key ANYWHERE in the game (vs. pressing ON the tank)? Can you share the logic for shooting? Thank yoU!

I think it might be Capture Clicks Anywhere in the mouseclick behavior