Equipping an item to a button

Hi,

I'm not sure if this question has already been answered somewhere, but I looked and couldn't find anything about it. So sorry if there is something already, I just couldn't find anything. 

So you know how in Pokemon you would hit the Select button to use something (fishing rod, item finder, etc). And in Mad Father you would press C to use the chainsaw?

I'm trying to do something like that. I want to be able to press a button and use an item. It'd be cool to do it like Pokemon where you choose what item to equip, but if I can't I'd just like to know how to do that for one item per button or whatever.

Thanks for whoever can help.
There's some wisdom to requesting a script for this if it's going to be a core element of your game.  However, if you want to Event it, create a Parallel Process event that checks (Conditional Branch) whether the C button (or whatever button - I suggested avoiding A/B/C and Directions since they will interfere with game functions like "talking to an NPC") is being pressed, and if so, run the item's Processing.  Finally, outside of the Conditional Branch, add a short Wait (2-5 frames) so that the Parallel Process event doesn't cause significant lag.

You could also have another event where you set up (possibly using a "Select Key Item" event command) which item to bind to your "Use Item" button.  Based on which item the player chooses, you can set a Switch ON to indicate that the player is using a certain item - for example, Switch 54 might mean that the player has chosen to bind "Item Finder" to the button.  Make sure to set all the other Item-based Switches OFF.  Now, you can attach Switch 54 to the Parallel Process event as the required switch, so that it will only run when the Item Finder is chosen, and you can create other PP events for all of your other key items that can be bound to your "Item Button", such as Fishing Rods and Chainsaws.

Original thread: https://forums.rpgmakerweb.com/threads/equipping-an-item-to-a-button.45579/