[b][/b]Hi Again,
I'm using sugarcane with a stylesheet that gives me a centre story and a stats/inventory box on the left.
In the stats/inventory box you can click on an inventory item and it will display a description and if you're in the right location it will use the item to solve a puzzle. TheMadExile gave me a hand setting up the stylesheet/script and it works great apart from one thing.
In the inventory item description passage I use [[Return|previous()]] to send the user back from the item description to the main story- I do this because they can obviously click on an inventory item at anytime.
The problem I've now discovered is if they click on an inventory item and get the description but then click on another inventory item they get that description but now I've created a circular previous() of inventory items and the player cannot get back to the game.
Any ideas on how I can solve this problem?
I don't have any scripting skills and trying to figure out how to do this logically is taxing my feeble brain, so appreciate any ideas
Thanks
nowherecity24
Comments
1. Tag all of your inventory passages with a tag unique to them (e.g.
inventory
).2. Put something like the following in a
script
tagged passage: I usedinventory
for the tag name there. If you already have your inventory passages uniquely tagged with something else, then simply replace the instance ofinventory
in the above code with whatever you're using.3. Inside your inventory passages, you'd do something like the following to return: That will send the player to the last encountered non-inventory passage, whatever it was.
My game is really coming on now thanks to you
I'm sure I'll be back again but until then thanks nowherecity24
Is there a way to do this in Harlowe?
1. The same as his point 1.
2. Put something like the following in your story's header passage.
note: If you don't already have one then create a new passage (you can name it whatever you like but I generally name mine Header) and assign it a header) tag. 3. Inside your inventory passages add a link something like the following: