[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,227
Reaction score
1,634
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).
 

Latest Threads

Latest Posts

Latest Profile Posts

Starting work on some stuff for the community. Hopefully it will be fun, and useful to somebody.
Searching what to play in my dead times, the nostalgia hit me hard and ended downloading the Patapon trilogy, hope I can avenge my child self and beating all the games hahaha
Finished the frontier and...I apologize to anyone who saw the trailer I posted and actually tried it. Technical marvel, crazy disjointed fetish story hidden inside a cheap milsim skin that has no idea what it's trying to be except sanctimonious and failing at even that. As much as I hate fallout 4's story, even it was better. I guess there just won't be another non-parody fallout after all.
Anyone else having trouble posting in the forum? I have no reply box in posts or in messages. This is the only place I can type. @Archeia?

Forum statistics

Threads
107,763
Messages
1,031,989
Members
139,911
Latest member
Katara
Top