I'm trying to make a navigation HUD (suing screens) that uses arrows to move to different parts of a room. I wan't to have just one screen with multiple if arguments, so pressing the same arrow of the HUD directs the player to different locations based on where he is.
To make it short:
1_ If the player is in the bathroom and clicks on the left arrow, I wan't him to go to th eliving.
2_ If the player is in the exit and clicks on the left arrow, I wan't him to go to the bathroom.
I tried using if statements to accomplish this but I'm failing (I read the documentation in the wiki by the way, but I still don't know what I'm doing wrong). Here's the code.
Code: Select all
define y = ("Yukio")
label start:
define location = 1
scene bathroom
y "Where am I?"
y "What happened?"
screen movement():
frame:
xalign 1.0 ypos 400
imagebutton:
idle "arrowPasive.png"
if location = 1:
action Jump("exit")
frame:
xalign 0.0 ypos 400
imagebutton:
idle "arrowPasive.png"
if location = 1:
action Jump("living")
call screen movement
label living:
scene living
y "It is night already..."
label exit:
scene exit
y "I need to find a way to open this door"
Please help me make this If statement work guys.