Code: Select all
I'm sorry, but an exception occured while executing your Ren'Py
script.
NameError: name 'menu_item1_unlocked' is not defined
While running game code:
- script at line 1584 of /Applications/Tests/game/script.rpy
- python at line 1584 of /Applications/Tests/game/script.rpy.
Code: Select all
if result == "button":
if menu_item1_unlocked:
"This is the second run-through."
"You already have item1."
jump beginning
else:
c "This is the first run through."
c "You get Item 1"
$ menu_item1_unlocked=True
jump beginning
1. Player investigates a certain area (a button).
2. Player receives an item.
3. If player clicks on that button again, a different result (e.g. "You already got item1 you greedy S.O.B.").
Would it be a good idea to start off the label:start block by setting all variables to false so that when they come up in code, they are defined? Or is there a better way?
Thanks!