Attack dependent on item in inventory?

Hi, I've got an enemy attack that calls for a common event to take away one of a specific item from the victim. So, basically a thief attack.


But, what about when the player doesn't have that item? Is there a way to make that attack conditional depending on whether or not the object is in the inventory?


I see that switches are there, but if I were to make a switch in a conditional branch checking for the item, would I have to put that on every single map in which those enemies appear? Or is there another way?


Thank you!
You could make it so that in the common event, it will check whether the player has the item or not, and then deduct it as needed.
Yep! My (much) more well-informed fellow former alluded to your other solution. Rather than making a switch with the conditional branch in it, and then having to do all the mumbo-jumbo with putting the switch on whatever maps that enemy appears (honestly, I wouldn't know how to do it that way), make a common event rather than a switch. This would allow you to make a skill with the common event on it. Just make it so that the skill turns the common event on and that the event itself turns itself off after it does what you want it to do.

Original thread: https://forums.rpgmakerweb.com/threads/attack-dependent-on-item-in-inventory.62257/