Basically what I'm asking is like for instance. I want to say that when someone went into the room he found a key... so if he goes back once then a new option will come up saying... "Now you can use the key to open the locked door".
note: you need to state which story format you are using as answer can be different for each one.
The SugarCube equivalent of @Rafe's answer is as follows:
<<set $haskey to "no">>
<<click "get key">><<set $haskey to "yes">><<goto "passage name>><</click>>
<<if $key is "yes">>Now you can use the key to open the locked door<</if>>
Comments
First, set the variable in a passage that is only visited once. It is best to sett all your variables in the starting passage.
Then, to get the character to collect the key, you could use a setter link
After that, you write a condition for the key text to appear
The SugarCube equivalent of @Rafe's answer is as follows:
EDIT: fixed that for you @GreyElf