[Solved] Can't stop movement

I’m working on a top-down rpg sort of game. So far, everything seems to work as intended when exported for use on a computer, but I’m having an issue with the mobile functionality.

I created 4 objects for buttons: in the events editor I have each button object’s action to “simulate button” for its corresponding movement with the condition “when cursor/touch is on.” The issue I’m having is that once the button is pressed, the player never stops moving, and it only happens on mobile.

I’ve tried using the condition “when left mouse is released” under mouse/touch, but it doesn’t seem to have any effect. I also tried using the “only trigger once” condition but that stops movement entirely - the button will no longer make the player move. I also tried using the “inverse” condition of “when object is touched/pressed” with no action to terminate the movement, which also didn’t work.

So my goal is to have button objects on screen that when moused over/touched pressed, make the player move, and have the player stop when the buttons are not moused over/touched; which works fine on pc export but not on android export.

Is this a bug, or am I missing something?

Also, thanks for contributing to a wonderful open source program. It’s proving to be a great distraction, and I look finishing a fun game some time in the very distant future.

“When cursor/touch is on” means “If the cursor is hovering over the button, or if the touch is moved over the button”

If you want it to only move when you are pressing the button (or tapping the button), you need to add a “when mouse button/touch is down” to the exact same condition box, not as something separate.

1 Like

Thank you, I believe it’s working the way I intended now.

1 Like