Move mouse cursor when touching screen


A couple of days ago I was struggling getting my player to switch nicely between the different levels on the map I had created. The player/frame was skipping the levels going from 1 and directly to 4.
After some great help here on the forum, I fixed the skipping of the player by using the action: -Move mouse cursor when touching screen: Yes-
The strange thing now is when the level starts, the player is constantly jumping as the button for jumping is on the same spot as the choose level button from the map. Is there a way to turn off or make the cursor appear on another place before or after the level has started?
I tried to toggle the -move mouse cursor when touching screen: No- (thinking the cursor would kind of disappear or be inactive) but it didnt help. Does someone here have any idea how I could solve this?

If you’re only using touch as input, add a “A touch has started” condition to each of the “Cursor/touch is on [object]” event conditions. This will only activate the button when a touch is made. Otherwise, as you noted, the cursor position activates the button by itself.


Thanks for taking the time to try and help me out.
To the map scene I tried to add the -a touch has started- but the result is the same. The player is constantly jumping when the level starts. Ive tried with/without the action -move mouse cursor when touching screen- ,on the level scene. Both states: yes and no. The result is still the same. Im a bit lost here. I thought that either of the actions of -touch started and -touch ended would have done the trick. Any other ideas of how I can resolve this?
Thanks for all help. :slight_smile:

I don’t see the “A touch has started” condition in your event snip. Where are the events that are causing your character to constantly jump?

Also, your level1-1 and level1-2 events are almost identical. I’m assuming you’ll have the same set of very, very similar events for other levels. If so, I’d suggest you refactor the code so it’s one set of generic events for any level. It’ll make adding more levels a hell of a lot easier.

Sorry, I was all hung up on: -Mouse button pressed- and mixed those together :slight_smile:
Tried with the: -a touch has started- and it gave me the same result with the skipping of levels. Got it working at last by changing some conditions and actions. In case others is having the same issue if they are making a map and wants the Player to be able to switch from one level and appear on the next level.

Thanks for trying to help me out. Really appreciate it :slight_smile: