Easiest and fastest way to event a pushed switch?

joket

Veteran
Veteran
Joined
Apr 24, 2021
Messages
129
Reaction score
21
First Language
English
Primarily Uses
RMMZ
Hello everyone, was wondering: what's the fastest and easiest way to event a button on the floor which when an event or a player does have same coordinates then it changes to pressed mode and goes back to unpressed if the event or player leave?
I can easily check it with variables for player x and y, but what about events? And what about randomly generated events?

Let's say I have a room with 2 button switches. I randomly spawn 3 balls and the puzzle is to put 2 of those balls on the switches. The switches can also be pressed by the player itself.
 

Quexp

Lifelong Learner
Veteran
Joined
Jun 18, 2018
Messages
557
Reaction score
1,145
First Language
English
Primarily Uses
RMMV
Check out this blog post! :D

EDIT: Oops, that's not the same tutorial I was thinking of but that looks good too.
Here's a video tutorial that I used to learn push events; it also includes a switch option:
 

joket

Veteran
Veteran
Joined
Apr 24, 2021
Messages
129
Reaction score
21
First Language
English
Primarily Uses
RMMZ
unfortunately this doesn't solve my problem: I have multiple events that can press the switch, I can't do it manually...
 

Quexp

Lifelong Learner
Veteran
Joined
Jun 18, 2018
Messages
557
Reaction score
1,145
First Language
English
Primarily Uses
RMMV
Ahh, sorry about that. I was hoping that would get you started. I wonder if you could use a Conditional Branch with a Region ID to trigger your switches.
 

Latest Threads

Latest Posts

Latest Profile Posts

About the Deer, I had to cut some piece of video due the *swearing* Youtube copyrights issues...
A caveman pokes his head in...
I was listening to songs by Chuck E Cheese's voice actor (Jaret Reddick from Bowling for Soup) when the meds I was taking for my stomach virus apparently stopped working. I can't take my next dose until morning, but it's no use anyway. I'm officially sick again. Of course, I'll definitely take the next dose either way, but it's useless now.
New profile picture! This time, it's representative of my current project.
I suddenly feel like making a game for little kids: a pointless sandbox of cute animals, silly collectibles, and random mini games.

Forum statistics

Threads
116,002
Messages
1,094,805
Members
151,306
Latest member
rpgLord69
Top