3 mixing potions. 1 key.

Hey everyone! I'm in need of some help! I'm trying to make it where the player has to find 3 mixing potions, get to a mixing table, and make an exploding potion (to open a door, not for combat). However, I'm having a really hard time doing so. I thought I had it with the whole key items. Any info would greatly help me! Thanks everyone!

ex1.PNG
Select key items stores the ID of the selected item into the variable, so your conditional branch checks if the selected item is item#2 from the database - NOT if there are two items of it in inventory.


To check the number of anything in the inventory, you need to use the control variable command, then select game data:item "X" in inventory, and use that variable in the conditional branch.
Mmmmm alright, let me try that out
Is there anyway you can show me an example of what your saying? I've hardly touched variable.
Odisholi, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.

Is there anyway you can show me an example of what your saying? I've hardly touched variable.
your event was almost correct, you just need to replace the select key item with the control variable command.


When you create the control variable command, the window has several options at the bottom, one of them game data - by default that reads "Map ID" when you select it.


However, after selecting you also have a button with three dots to the right of that "map ID". click on that button.


The rest should be obvious.


Variables are the most important part of the engine if you want to make more than the simplest quest. Learn how to use them.


If you follow the link in my signature, one of the tutorials I listed there is the "variables guide" - work through that please.
1) You can use the script call:

$game_party.item_number($data_items[n]) >= y

where 'n' is the location of the item in your database, and 'y' is the amount of that item that your party has.

2) You need to specify an amount of the particular item, otherwise, the event will turn out exploding potions even though you don't have enough mixing potions.

3) Be sure that that particular item is set to 'Key Item', otherwise it will not show up in your 'Select Key Item' menu.

4) Your event should contain something like this:

@> Select Key Item: [0001: Key Items]

@> Conditional Branch: Variable [0001: Key Items] == n

@> Conditional Branch: Script: $game_party.item_number($data_items[n]) >= 3

@> <insert your 'Change Item' command here>

Original thread: https://forums.rpgmakerweb.com/threads/3-mixing-potions-1-key.37350/