Easiest and fastest way to event a pushed switch?

joket

Veteran
Veteran
Joined
Apr 24, 2021
Messages
132
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
132
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

thought I'd upgrade to mz from mv cause of the nice quality of life features but ****ing hell why couldn't they allow old plugins to work in it and secondly how come in over a year since it's release has there been no mz version of something so crucial as a non grid based movement plugin. I guess I'll stick with mv. (why wasnt mz just an update to mv anyway literally nothing substantial changed..)
Something might be coming...
Hallo.png
A new day for creating :)
2021 has been the runner-up for the worst year of my life. 2015 may take that title, but '21 is pushing it. Excuses really don't justify how much of a jerk I've been this year to a lot of people.

I'm sorry. I don't intend to be a jerk forever, but I'd rather back up my intent with actions, not words.
"Another hundred habaneros... a teaspoon of tumeric... and a heaping helping of nitroglycerin!" The kitten in a chef's hat laughed maniacally as the pot he was stirring promptly exploded.

Forum statistics

Threads
116,020
Messages
1,094,962
Members
151,334
Latest member
seanhickey00
Top