Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Can I change the left mouse click button to the confirm button?

A topic by 77Survival created Sep 05, 2024 Views: 83 Replies: 7
Viewing posts 1 to 2

Can I change the left mouse click button to the confirm button(OK)?

Developer

Hi there!

This plugin does not let you change the the Inputs of keyboard, gamepad or mouse. What it does is associate a common event to be played when you press a mouse button.

Also, the Mouse left click is, by default, the same as the confirm button (OK). So I didn't understand your question. Maybe if you ellaborate more I can give you a better answer.

I've set it so that the left mouse click won't make the player walk, but instead, the player can walk using the arrow keys or WASD. However, when the player walks to an event, is it possible to use the left mouse click to initiate a conversation?

Developer

Did you try to see if it will work? I guess this is a thing you need to see with the plugin author that provides you the way to disable the mouse walking feature.

As I told you before, my plugin only attaches common events to mouse buttons. Maybe what you can do is, check the mouse position and see if there is an event there. If yes, then you can activate the event manually. Here is a script that you can put on the Left mouse button common event:

if($gameMap.isEventRunning()) return
 
const x = $gameMap.canvasToMapX(TouchInput.x);
const y = $gameMap.canvasToMapY(TouchInput.y);
const event = $gameMap.eventsXy(x, y)[0]
if(event) event.start()

I tried using it, but the game crashed. I'm not sure if I set it up incorrectly. I tested a simple left mouse click to display text, but it still crashed. Is there a way to fix this?


Developer

Hi there!

You may try to set the overwrite key to true, since the Left mouse button, is the one used to make the character walk on the screen and interact with events, by default.

But, I need to know what crash is this. When the error happen again, press F8 or F12. A browser window will open. Go to the CONSOLE tab, and send me a screenshot of what is in there.

Is there a way to fix this?"

Developer

What about my previous reply? That previous error is gone?

About that new error, It's like I said to you before, on my previous answer:

But, I need to know what crash is this. When the error happen again, press F8 or F12. A browser window will open. Go to the CONSOLE tab, and send me a screenshot of what is in there.

When this last error happen? What are you doing for this to happen?