Hello, fellow gamemakers. I have a few questions about an event I'm making.
First of all, I want to add an item only if a key item is present (if player has an empty bottle, add "spring water" to their inventory). I can have the event check for the bottle, but there's a problem. I've set up a choice- drink the water, put it in a bottle or do nothing. See where this is going? The entire event won't trigger if there's no bottle present. Any suggestions?
When I chose "select key item" in the event commands, a choice of variables came up. How do I tie a variable to an item?
Never mind, I found out.
put the condition only on the second option instead of the entire event - use conditional branch instead of event conditions for that.
You are using a choice command right? Have the event check for the empty bottle when the player selects the "put in bottle choice" not before the choice options. Then if the player has an empty bottle they will fill it up and you would remove the empty bottle item from the inventory and add a potion item to the inventory. If the player does not have the empty bottle in their inventory show a message telling the player that they don't have an empty bottle to fill up.
-Or-
If you don't want the fill up bottle option appearing when they don't have an empty bottle create a branch in the beginning of your event that first checks for an empty bottle,
if they have the empty bottle do what I said above, if they don't show the choices without the fill up bottle option that way it won't show up if they don't have an empty bottle.
That was fast! I was wondering if there's a way to add the bottle in the first place, thus avoiding the problem altogether.
You mean the empty bottle? How you add that item to the player's inventory is dependent on your game, is it something they purchase in a shop or have to find? There's no right or wrong answer to this I guess just whatever you want to do. Just remember if you are having the player find empty bottles that you make sure to add it to the player's inventory with the change item command.
No matter what you do though with how you want to do this event you need to check for an empty bottle in the player's inventory, they can't fill an empty bottle if they don't have one and filling an empty bottle will consume an empty bottle. You need to make sure that the player can't fill an empty bottle if they don't have an empty bottle in their inventory.
I'm assuming this is an event like a magic spring of water that the player can come back to later and thus will potentially be run more than once.
Any event which has a 'Change item' in it will add it to the player's inventory, if that's what you're asking. Judging where and when to do such an event is something that only you can decide.
Ninja'd