Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How can I make certain options come up only when you get certain information

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".

Comments

  • I do not know if you are using harlowe, but you coud set a variable to tell the story if you got the key.

    First, set the variable in a passage that is only visited once. It is best to sett all your variables in the starting passage.
    (set: $haskey to "no")
    

    Then, to get the character to collect the key, you could use a setter link
    (link: "get key")[(set: $haskey to "yes")(goto: "passage where you want to go. Can be the same passage you are in")]
    

    After that, you write a condition for the key text to appear
    (if: $key is "yes")[(Now you can use the key to open the locked door)]
    
  • edited June 2015
    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>>
    
  • passage name is missing the end quote.
    EDIT: fixed that for you @GreyElf
    :)
Sign In or Register to comment.