RMMZ How to make 'if right mouse button is pressed'?

muso

Villager
Member
Joined
Aug 27, 2022
Messages
18
Reaction score
10
First Language
korean
Primarily Uses
RMMZ
If : Script : TouchInput.isCancelled()

I wrote the event like this.

but, It was not 'pressed'. It was 'triggered'.

If I hold down the mouse, an event occurs only once.
I want the event to repeat while the right mouse button is pressed.

If : Script : TouchInput.isPressed()
If : Script : TouchInput.isTriggered()

I know that there are two script of left mouse botton.
What should I do in the case of right mouse botton?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,966
Reaction score
16,019
First Language
English
Primarily Uses
RMMV
TouchInput has the following functions:

isRepeated - checks whether the left mouse button or touchscren is just pressed or a pseudo key repeat occurred.

isLongPressed - checks whether the left mouse button or touchscreen is kept depressed.

I don't really understand what the difference is, but these both function on the left mouse button and there isn't an equivalent for the right mouse button, so you would have to write one.

By default, the right mouse button brings up the menu. How are you going to handle the override so it knows when to open the menu and when not to?
 
  • Like
Reactions: Bex

muso

Villager
Member
Joined
Aug 27, 2022
Messages
18
Reaction score
10
First Language
korean
Primarily Uses
RMMZ
TouchInput has the following functions:

isRepeated - checks whether the left mouse button or touchscren is just pressed or a pseudo key repeat occurred.

isLongPressed - checks whether the left mouse button or touchscreen is kept depressed.

I don't really understand what the difference is, but these both function on the left mouse button and there isn't an equivalent for the right mouse button, so you would have to write one.

By default, the right mouse button brings up the menu. How are you going to handle the override so it knows when to open the menu and when not to?

In my case, I don't need to open the menu with the right mouse button.
Because the basic menu is disabled.
I'm using a custom menu made from an event.
 
  • Like
Reactions: Bex

Latest Threads

Latest Posts

Latest Profile Posts

KDS
Hey guys! Iam currently updating my free digital art shop , let me know if you need anything done :) https://forums.rpgmakerweb.com/index.php?threads/kds-free-open-digital-art-shop.17097/
Hello! I’d like to ask where is a good place to start logging about my game dev progress as production of my game goes forth
In one of our campus classrooms was a bag full of stuff people forgot there... my bag. That I forgot there xD
You know your room is too tiny for how much stuff you have when it gives you literal insomnia. I just cleared a bunch of stuff out and man it feels good!
1670381555475.png
Meet the Kernel. You encounter him in cyberspace. He's important!

Forum statistics

Threads
127,098
Messages
1,183,961
Members
167,026
Latest member
silverbell
Top