Using a variable inside a screen
Posted: Sun Mar 29, 2020 11:00 am
Hi, I'm using a variable called open which is either true or false. This variable is declared at the beginning of the code.
The variable "open" is False by default.
I then change the value to True (doing certain thing in the game) but when I want to use this variable inside a screen, I just can't.
Is there a way I can call the variable "open" in which the screen would recognize it?
The variable "open" is False by default.
Code: Select all
define y = ("Yukio")
default open = False
label start:
hide screen item
scene bathroom
Code: Select all
screen doorknob():
tag item
imagebutton:
xalign 0.2 yalign 0.55
idle "doorknob.png"
action If(("open" == True), true = Jump("living"), false = Jump("start")) # Here I'm trying to use the variable "open" but the screen doesn't recognize it.