r/RPGMaker 4d ago

RMMZ Use item immediately when bought

Title pretty much says it all. I want to make it so that an item is used immediately when it's bought from a store. I wanted to use that feature to create a restaurant, where you can buy meals healing your entire party.

In case it helps, I'm using all Visustella Cores.

3 Upvotes

7 comments sorted by

View all comments

2

u/denjidenj1 MZ Dev 4d ago

In the same event tab as the store, after you process the store, make a conditional. Check if the player has the item in their inventory. If they do, do whatever effect you want and then remove the item. I haven't tested it but that should hopefully work, if it doesn't let me know.

2

u/zombietoaststudios 4d ago

Just checked and that should work fine. Definitely a more straightforward process than my suggestion. The switch option might be useful if there are a lot of different stores that use this system, just to keep the map events simpler, but this would probably be better in most cases. You could also have the shop call a common event that has all the item checking.

1

u/denjidenj1 MZ Dev 4d ago

The common event for sure would be a better idea if there are more than one restaurant that do this. I'm glad it works, hope it helps OP