RMMV Help to trigger some keyboard buttons with YEP_ButtonCommonEvents.js

Xntraxz

Villager
Member
Joined
Jun 7, 2018
Messages
14
Reaction score
1
First Language
Spanish
Primarily Uses
RMMV
Hey, im a little confused... when using this plugin, it allows you to assign a common event to a pressed key, but I want to know if it is possible to activate and deactivate something by pressing the same button as if it were a switch.

Example in pseudocode:

Press "T":
The screen turns gray color.
(Using a common event)

Press "T" again:
The screen returns to normal color.

This is where my question is, ¿how can I make pressing the same key again take me to normal color?
 

CaRa_CrAzY

Undefined Custom Title
Veteran
Joined
Jan 19, 2019
Messages
65
Reaction score
27
First Language
Portuguese
Primarily Uses
Other
You should put your branching logic inside your common event. Something like:

Code:
if switch ON then
    switch OFF
    turn off lights
else
    switch ON
    turn on lights
end
 

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

Latest Threads

Latest Posts

Latest Profile Posts

People1.png & SF_People1.png added!!!!

Adventurer:
"Why your body looks like a bird?"

Stranger:
"Because I'm harpy"

Adventurer:
"Clap along if you feel like a room without a roof"

*Both dancing to Pharrell Williams song*
Stream will be live shortly with a make-up session of the Interactive Text Adventure! Feel free to drop by!
Pootscooter wrote on Pharonix's profile.
Hey @Pharonix, just wondering what you're up to lately and if you've had an opportunity to check out the LTBS thread in the past few days...(a couple of us could really use your expertise). Hope you are well and Happy Thanksgiving!

Forum statistics

Threads
105,506
Messages
1,014,262
Members
137,173
Latest member
zoetsoi
Top