Button Common Events

Last Updated: 2012.01.09
Download Link
Github Link

RPG Maker VX Ace supports 8 different action buttons to use. However, only 3 of those are used (A, B, and C) on the field map. The rest of them aren’t used at all. This script allows usage of the L, R, X, Y, and Z buttons by binding them to common events.

Modify the COMMON_EVENT hash in the script module to adjust which common events are used for each button.

And that’s all, folks!

15 comments on “Button Common Events

  1. Please how can I change the bind in game? I wish i could use some buttons depending on the circonstance. So is there a way to change it by a script call?

    • Construct your common event in a way that changes on circumstance for example:
      if variable 1 = 0 then do something
      if variable 2 = 1 then do something else
      Then all you have to do is change the variable depending on the circumstance.

      There are other ways with switches and other conditions experiment to see what is best for you.

  2. Pingback: A little late… « Candy Coded Response

  3. Can I use this in a battle situation too? Like, if I would have something like Squall’s Gunblade in Final Fantasy VIII where you use a button to trigger an extra effect at the right time.

  4. Can I change the bindings like, if i press on “L” on my kayboard, then it will do the common event i asked for (in script I type :L => 48). But it only works on “Q”.
    Help plz.

  5. I’m having a little bit of trouble with this script. I input it as so-

    # :Button => Common Event,
    :L => 0, # Does not run a common event.
    :R => 0, # Does not run a common event.
    :X => 0, # Does not run a common event.
    :Y => 0, # Does not run a common event.
    :Z => 1, # Runs common event 1.
    } # Do not remove this.

    (I only want to use the Z button as a sort of attack button).
    But I get the same error message-

    Script ‘Fight Button’ line 64: SyntaxError occurred.
    unexpected ‘=’, expecting tASSOC.
    :L => 0, #Does not run a common event.

    Am a newbie, btw. I’m trying to use this in an “Exterior” map, could that be an issue?

  6. Pingback: Switching Parties | The Iron Shoe

  7. Pingback: A Blue Flame, A Lantern, and A Brazier (an eventing walkthrough) | RPG Maker VX Ace - Ian Bach

  8. This would have been very nice if I knew how to… make the jump common event not land me on tiles I can’t move to/from or outside the map. Help?

    • I know of a way to do it, but it’s really complicated…
      First, you need to either put a terrain tag (under tilesets in the database) on all the tiles you want to be impassable, or you need to paint borders with regons on the map itself (use whatever method suits you best).
      Then, when you run the event, set a pair of variables to the player’s X and Y positions (this can be done under Game Data in the Control Variables command) and add or subtract from either variable depending on what where you want the player to jump (for instance, -2 from the X variable if you are going to jump left 2 tiles)
      Now your X and Y variables should correspond to the space you want to check. There is an event command called Get Location Info that will get the terrain tag or region number and put it into a variable. Now you can simply check the variable to see if the terrain is jump-friendly or not according to the tags you made.
      I know it’s a ridiculously long and convoluted way to do it, but it will work if you do it properly. Feel free to let me know if you find an easier way! :)

  9. I’m not terribly familiar with Ruby yet, It’s appears simple but I’m having trouble picking your script apart to expand the functionality of it some. Is it Possible to make some simple changes to your script and poll some extra common events that happen on Key Release?

  10. Is it possible to allow the use of more than those five keys?
    I’m making a game that uses at least seven skills in the overworld.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s