I created some items and made them available on a certain page. You then get to click on icons to add them to your inventory, which I think is pretty cool. However, reading the tutorials, it appears that if you want the items to be automatically dropped when the user clicks on a page link, you have to use $ITEMSTATE := 1 to add the item and then $ITEMSTATE := 0 to drop it, meaning that while there IS a way to have items automatically dropped, you have to sacrifice the mechanic of clicking on a picture of the item to get them, and instead rely on page links to add them.
Is there a way that I can add the items by the player clicking on the item picture, but then have the items all dropped later by the player clicking on a page link? Or do I have to just deal with not being able to click on the item pictures to add them to the inventory?
I thought of one clunky solution, but I'm hoping for something more efficient. Would this work, though?
Suppose I have a sword I want to add. Have an item (with the picture of the sword) called "Check condition of sword," with instructions to click on the item to add it. When the player clicks on that item, it takes them to an identical looking page, except I add the script $ITEMSTATE1 := 1, and when they go to that page the sword is in their inventory. I could add a limit of uses to the "Check condition of sword" item to 1, and then I assume it disappears. From then on you should have the normal sword in the inventory, except it is tied to $ITEMSTATE, which means I can script $ITEMSTATE := 0 later to get rid of it.
Could that work? Also, is there a better way?
If that's the case I may scrap the idea altogether. I thought the click to add was pretty cool, but I suppose if people are tired of that, they'll be quite annoyed at what I have now, where you click a treasure chest, then use it, to get your item.