[RPGMZ]Event, mouse over the image

Chibi89

Villager
Member
Joined
Sep 5, 2020
Messages
6
Reaction score
1
First Language
italiano
Primarily Uses
RMMZ
Hi guys, I would like to know if without plug-in it is possible to make sure that when the mouse over an image passes it behaves as I want.

Waiting for your eventual response, I wish you a good day.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,223
Reaction score
1,630
First Language
EN
Primarily Uses
RMMZ
Without a plugin, I'd suggest a Parallel event checking cursor coordinates every (few) frame(s), maybe something like this:
Code:
◆If:Script:const picId = 5; SceneManager._scene._spriteset._pictureContainer.children[picId - 1]?.isBeingTouched()
  ◆Text:None, None, Window, Bottom
  :    :Pic 1 hovered!
  ◆
:End
◆Comment:Check once every 6 frames (10 times per second)
◆Wait:6 frames
Easy-copy version of the script I've used here for Conditional Branch > Script:
JavaScript:
const picId = 5; SceneManager._scene._spriteset._pictureContainer.children[picId - 1]?.isBeingTouched()
Replace the 5 with the ID of the picture you want to check.

A plugin would be more efficient, though. I happen to have one that lets you bind common events to "enter"/"leave" cursor actions, as well as offering optional opacity-based hit detection. Here's a link in case you're interested: view/download Cae_PictureTouch.js (Google Drive).
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

After hearing Wataten's opening several times and knowing what this anime is about, I don't think I like moe anymore.
So I am working on a big DLC package for my game.... and it will add a new intro and extend the ending of the base game, while of course adding additional content to the game... Yeah, that should work! lol
I'm stuck, I'm making some of Mr. N's Dialogue but I can't finish his full Dialogue...heres what I got now [this is the part I'm stuck on] "You treat me like a
bug, I'M SICK OF IT, you had me make these...abominations...well, now..." and at the "Well, now...' part I'm stuck at, anyone got Ideas?
Ami
--- Top Up ---

Merchant: Diamond Sword cost 100 Diamonds
F.Magic Knight
: I don't have Diamonds,what should we do?
M.Knight: I don't have any choice,i have to Buy Diamonds with my Card
F.Magic Knight
: You do?
(M.Knight's Balance Just Have 1.25)
M.Knight: (Chuckle) Maybe,later…

Forum statistics

Threads
107,547
Messages
1,030,422
Members
139,673
Latest member
WDRS
Top