Equippable Item as a Variable

Hello, newbie using this software!

I've been playing around with it for a couple of days and managed to make a starting area for my RPG.

In order for the character to be allowed to leave (another character blocks the door) they need to have looted a chest from the cellar.

The item that gets taken from the cellar chest is a weapon. This weapon becomes my control variable. If it's equipped it gets removed from the inventory, and so even if the chest has been opened and the weapon equipped, the character at the door still sees this as there not being a weapon in the inventory. If it's not equipped, the character at the door lets me leave and continue on.

I can't see if there's an option to use the 'self switch' state of the chest (EV001) as the variable instead of the inventory item.

Any suggestions would be much appreciated. It's possible that I just need to look at this from a different point of view, but I get the feeling it's easier said than done! 😛

Thanks!
A weapon is not a "variable". Your terminology is confusing.


In your "guard" character's event, just do a Conditional Branch to see if the weapon is in the inventory - tab 4. Check the "Include Equipments" box and it will look at each actor to see if they have it equipped.
Same as what Shaz said. But, I think you should look into having the NPC at the door have a conditional branch. It can be found on the first tab of event commands, when you go to insert a new command. When the conditional branch options appear, go to the second or fourth tab.

If you want an event to progress when something is equipped, there is an option under the second tab. If you want an event to progress when something is in the inventory, the option is found under the fourth tab.

The check box at the bottom will make a separate part, the "Else" branch when it is left checked. You can have the NPC or whatever tell your player to open the chest and equip the sword, or whatever, in this part from the event itself. You'll see it (what I'm talking about) when you insert this onto the event page itself. Hope this could help you! c.c
Sorry if I put across anything that was confusing. As I said, rather new to the software.

Somehow I had managed to set up an item from the inventory as a variable, even though I obviously didn't need to. I can only apologise for that act of idiocy! The suggestions that were posted were a big help, and I've gotten my NPC to play nice now.

Thanks.
no, you didn't set up the item as a variable - the command you used loads the number of how many of the item the player owns into that variable.


I suggest as a new user, follow the link in my signature to learn about the terminology and the basics of the program - it will help you a lot when you get everything correct from the beginning.

Original thread: https://forums.rpgmakerweb.com/threads/equippable-item-as-a-variable.40494/