Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

Resetting the Item after Use

11 years ago

So I'm trying to make a Shop in my Storygame where the player can go and get items using money. When the player purchases something, they put it in their inventory for later use. When the player uses the item, the item goes away. When they go back to the shop to purchase the item again, the item isn't there! Is there a reset script or button that I can check to reset the item? Or can I use restrictions to reset the item? It's like my storygame still thinks that the player has the item even after they used it!

For Example:

Page 1: You are in the shop and someone asks what you want to buy. 

Option 1- "I'll have the drink"

Page 2: The drink is added to your inventory.

Option 1: Continue

(Player uses item later in storygame, but then decides to go back and get the same item again.)

Page 1: You are in the shop and someone asks what you want to buy.

Option 1- I'll have the drink"

Page 2: The drink is NOT added to your inventory because it's not there. 

This is basically the problem I'm having in a nutshell.

 

EDIT: So after playing around a bit with the variables and options, I was able to figure out a work around solution. When selecting the "continue" option on my hypothetical Page 2/Option1, I have the Drop Item command set to the item that was used. When going back to the shop, the item is listed there again.