It looks like you're new here. If you want to get involved, click one of these buttons!
<<if $hasKey>>The door unlocks<<else>>The door is locked.<</if>>This checks if the variable $hasKey has been set to true, and if so unlocks the door. If not, it doesn't.
<<if $takenDrug>><<textbox "$keycode" "" "resultgood">> <<else>> <<textbox "$keycode" "" "resultbad">><</if>>This works*, but I don't understand the purpose of the variable $keycode. This is just the name I gave it, because I understand I must, but I'm not referencing it anywhere else so what's its purpose here?
Comments
My question is, if I'm not referencing $keycode anywhere, what purpose is it serving? Why is it there?
I know that in your head you've just answered this question, but like I say I'm none the wiser.
In other words, why can't I just create a blank text box with: Where resultbad is the name of the passage the player gets sent on Enter?
If you want to ignore the value, that's fine--though you should use a temporary variable, e.g. _keycode.
Thanks.