www.yanfly.moe
So I've been using this script to build my game's point-and-click UI for some time now, and recently made a very simple system of holding down a button on-screen that closes the player's eyes [blackening the screen], and then opens them once you release the button [fading in the screen].
[I also made this work with covering their ears. Both were to aid in tiny 'don't look at the scary thing' events in-game where you have to close your eyes in time before an event's timer runs out. I digress.]
In Yanfly's plugin, there's 4 behaviors you can attach common events to, on pictures.
Click - Activates the CE once upon click
Repeat - Activates the CE every 6 frames while holding
Hold - Activates the CE every frame while holding
Release - [THIS is the troublemaker] Activates a CE upon Releasing the Button
My system looks like this:
Common event 1: CLOSE EYES [Activates either via Click or Hold, both work.]
Trigger: None
Contents:
Control Switches: #0002 EYES CLOSED = ON
Show Picture: #100, Black Screen, Upper Left (0,0), (100%,100%), 255, Normal
This closes the character's eyes and keeps the EYES CLOSED switch ON.
Common event 2: OPEN EYES [Activates via Release, aka stopping your click]
Trigger: None
Contents:
Fadeout Screen
Wait: 30 frames
Erase Picture: #100
Fadein Screen
Control Switches: #0002 EYES CLOSED = OFF
This opens the character's eyes and turns the EYES CLOSED switch OFF.
This system works PERFECTLY if you
ONLY click, hold, and then release at whatever point you want.
Here's my predicament: Yanfly's plugin has a weird behavior for 'RELEASE' as a behavior for picture common events. If you move your cursor out of the picture's boundaries while still holding your mouse, and THEN you release, it doesn't count it and doesn't activate the 'RELEASE' common event.
I want there to be a way that, just like with 'REPEAT' and 'HOLD', if you move your cursor out of the picture's boundary, it'll count that as 'RELEASE', and will activate the 'RELEASE' common event.
REPEAT and HOLD seem to have this capability, according to Yanfly's own in-plugin words:
But RELEASE does not. [And I only JUST NOW realized that it DOES stipulate 'releases the mouse above this picture']
If anyone could help with this, it'd be greatly appreciated. Either I need a change to the plugin code that'll allow RELEASE to register 'moving cursor out of picture boundary AND 'releasing click above this picture', or I need a way to make this system somehow work with RELEASE or HOLD.
Please and thank you in advance.
EDIT #1:
If there was a way to have a NEW behavior added, OR to change 'release' to something else, that'd be perfect.
It'd be exactly what I need if there was a way to have the behavior go:
Mouse cursor -> over picture
[no Common Event activation]
Mouse cursor -> leaves picture
[ACTIVATES COMMON EVENT ID]
That way I could have two events:
Click - TURNS ON SWITCH
Move Mouse Away - TURNS OFF SWITCH [only if switch is ON, to avoid mousing over the icon by accident and activating a common event.
www.yanfly.moe
So I've been using this script to build my game's point-and-click UI for some time now, and recently made a very simple system of holding down a button on-screen that closes the player's eyes [blackening the screen], and then opens them once you release the button [fading in the screen].
[I also made this work with covering their ears. Both were to aid in tiny 'don't look at the scary thing' events in-game where you have to close your eyes in time before an event's timer runs out. I digress.]
In Yanfly's plugin, there's 4 behaviors you can attach common events to, on pictures.
Click - Activates the CE once upon click
Repeat - Activates the CE every 6 frames while holding
Hold - Activates the CE every frame while holding
Release - [THIS is the troublemaker] Activates a CE upon Releasing the Button
My system looks like this:
Common event 1: CLOSE EYES [Activates either via Click or Hold, both work.]
Trigger: None
Contents:
Control Switches: #0002 EYES CLOSED = ON
Show Picture: #100, Black Screen, Upper Left (0,0), (100%,100%), 255, Normal
This closes the character's eyes and keeps the EYES CLOSED switch ON.
Common event 2: OPEN EYES [Activates via Release, aka stopping your click]
Trigger: None
Contents:
Fadeout Screen
Wait: 30 frames
Erase Picture: #100
Fadein Screen
Control Switches: #0002 EYES CLOSED = OFF
This opens the character's eyes and turns the EYES CLOSED switch OFF.
This system works PERFECTLY if you
ONLY click, hold, and then release at whatever point you want.
Here's my predicament: Yanfly's plugin has a weird behavior for 'RELEASE' as a behavior for picture common events. If you move your cursor out of the picture's boundaries while still holding your mouse, and THEN you release, it doesn't count it and doesn't activate the 'RELEASE' common event.
I want there to be a way that, just like with 'REPEAT' and 'HOLD', if you move your cursor out of the picture's boundary, it'll count that as 'RELEASE', and will activate the 'RELEASE' common event.
REPEAT and HOLD seem to have this capability, according to Yanfly's own in-plugin words:
But RELEASE does not. [And I only JUST NOW realized that it DOES stipulate 'releases the mouse above this picture']
If anyone could help with this, it'd be greatly appreciated. Either I need a change to the plugin code that'll allow RELEASE to register 'moving cursor out of picture boundary AND 'releasing click above this picture', or I need a way to make this system somehow work with RELEASE or HOLD.
Please and thank you in advance.
EDIT #1:
If there was a way to have a NEW behavior added, OR to change 'release' to something else, that'd be perfect.
It'd be exactly what I need if there was a way to have the behavior go:
Mouse cursor -> over picture
[no Common Event activation]
Mouse cursor -> leaves picture
[ACTIVATES COMMON EVENT ID]
That way I could have two events:
Click - TURNS ON SWITCH
Move Mouse Away - TURNS OFF SWITCH [only if switch is ON, to avoid mousing over the icon by accident and activating a common event.]
Excuse me, i have the problem when using plugin command MovePlayer Up and others, TriggerButton and others it doesn't work. Do you know why ?