RPG Maker Forums

I am using this script to trigger a common event by pressing a key, and it works fine! But now my question is this: is there anyway to assign a different key to trigger a different common event? (i.e: Pressing L triggers common event 7, pressing R trigger common event 8, and so on). 

This is the script:

class Scene_Map < Scene_Base # Common Event trigger key CallCommonEventKey = Input::L # Common Event ID to trigger CallCommonEventID = 7 # Frame Update alias sawnik_update :update def update sawnik_update update_common_event_trigger end # Update Common Event Trigger Check def update_common_event_trigger if not $game_message.visible and Input.trigger?(CallCommonEventKey) $game_temp.common_event_id = CallCommonEventID end endendThank you so much in advance for your time :)

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,038
Messages
1,018,467
Members
137,821
Latest member
Capterson
Top