Android game, how to change the cursor mode?

Started by SirLean, Sun 16/07/2023 20:04:28

Previous topic - Next topic

SirLean

So I'm creating the game of my dreams, and I'm testing it on my android phone.

Everything looks fine but, how can I change the cursor mode? Only the "Walk to" Cursor is available, wherever I click I can't seem to be able to change the mode to "Look at" which is the one that plays a huge role in the game.

2nd question, if changing cursor modes is impossible on Android: how can I then change my "2 cursors" game, to a "1 cursor for all" game? which lines of code do I have to edit? Thank you very much.

Crimson Wizard

#1
Quote from: SirLean on Sun 16/07/2023 20:04:28Everything looks fine but, how can I change the cursor mode? Only the "Walk to" Cursor is available, wherever I click I can't seem to be able to change the mode to "Look at" which is the one that plays a huge role in the game.

Please, first of all you have to explain which kind of controls do you have in game, and how do you normally change the modes by the mouse. Without knowing these details I may only guess about what the problem may be.

Android's controls are currently using "mouse emulation", which means that touches are converted into "mouse clicks" in game.
If your game is requiring the right mouse button to either switch cursor or activate a second verb, then you need to set a "Touch to mouse emulation" setting in "Default Setup" to "Two fingers".

Quote from: SirLean on Sun 16/07/2023 20:04:282nd question, if changing cursor modes is impossible on Android: how can I then change my "2 cursors" game, to a "1 cursor for all" game?

Mouse input is scripted in "on_mouse_click" function in the global script, this is where you decide which mouse buttons to react to, and how.
Using 1 cursor mode for all is also a design choice. If you go this way, then first you need to define clearly how do you want your game to behave (what happens when player clicks), then it will be possible to figure out how to write that in code.

SirLean


SMF spam blocked by CleanTalk