Hello all,
I am trying to complete a 2 way horizontal movement behavior which is supposed to function as follows:
on creation begin moving right, on touch flip the movement to left, another touch back to right, so on and so forth. I have this working.
My problem is I want the actor to move towards the center of the screen, and stay there, while the mouse is down. I almost have it but I must be doing something wrong because two bugs occur:
bug1 is if the actor moves all the way to the right side of the screen and then i hold down the mouse, he won't stop once reaching the center of the screen.
bug2 is if i test the game on my mobile device (android) the move to center while mouse is down and then stay there when centered block of code doesn't work at all.
Attached is my attempt at creating the behavior so far, perhaps you can see my mistake? Thanks in advance for any help anyone can provide me. I should mention the actor also has the cannot exit screen behavior enabled (only the x-axis)