Common event when interacting with regions?

Hello. this time i'm looking for a Script that can run a Common Event when interacting with a region. (When you pres Z next to it) this could stop me from having to throw events everywhere.

Thanks for considering this! 🙂
By "next to it" you mean if the player is directly facing the tile (similar to action button events)?
Yes. They would behave exactly like Action Button events.
Shaz has just the script for you.  Regions call common events - either when you're standing on them, or when you're facing them (you choose).  Give me a minute and I'll find the link for you.

EDIT

And here is it http://forums.rpgmakerweb.com/index.php?/topic/17306-region-common-events/
Ummm... doesn't that script activate the Common Event when you face the Region, not when you press the accept button next to it?
I just wrote a small script, that should do what you want:

module REGION_EVENTS KEY = :Z MAP = { 1 => 1 } endclass Game_Player < Game_Character alias :region_event_update_nonmoving :update_nonmoving def update_nonmoving(*args) region_event_update_nonmoving(*args) if(movable? && Input.trigger?(REGION_EVENTS::KEY)) next_x = $game_map.round_x_with_direction(@x, @direction) next_y = $game_map.round_y_with_direction(@y, @direction) event_id = REGION_EVENTS::MAP[$game_map.region_id(next_x, next_y)] $game_temp.reserve_common_event(event_id) unless event_id.nil? end end endKEY is, well, the key that should be checked for.MAP is region id => common event id.
Brilliant! That works perfectly!

Thanks! 😀

-Someone can close this now or something 🙂

Original thread: https://forums.rpgmakerweb.com/threads/common-event-when-interacting-with-regions.40362/