Check for item in event

Hey, I just resumed work in XP after some time. I want to make an event dependent on the player having a specific item, but it looks like I'd need to write a script. What might that script look like?

Actually, what would be ideal is if adding an item automatically incremented a variable. Can that be done?
I'm working in MV so I'm sure it's not the same, but you can do this with eventing -

1. On your dependent event, check through a conditional branch whether the party possesses the item that is required.

upload_2017-11-10_13-9-6.png


2. Or, if you need X amount of that item, you can set a variable to the number of that item and then check on that variable in a conditional branch.

upload_2017-11-10_13-11-25.png


Hope this helps.
Looks like it'll work! I guess "item exists" officially became a condition in Ace- but a conditional branch is a different story. Thank'ee, Guvner!
Nope, both of those are in XP.

Control Variables has Item X In Inventory, which puts the quantity into the variable, so you can then use the variable in a conditional branch to see if they have 10 rats.

Conditional Branch has Item X In Inventory on tab 4, which just checks that you have at least one of the item - it doesn't care how many you have.


If you don't see that in your XP, maybe you have a really, really old version.

Original thread: https://forums.rpgmakerweb.com/threads/check-for-item-in-event.86992/