So I don't know why I'm still strugglin with this... I've been trying to make three clickeable buttons unlock the last one to keep going in the story but I can't make it work.
Here is the code, the ones that are marked with the numers #1 #2 #3 are buttons that unlock the one that is marked as #unlockhere
I would appreciate any help.
Here is the code, the ones that are marked with the numers #1 #2 #3 are buttons that unlock the one that is marked as #unlockhere
I would appreciate any help.
Code:
init python:
button_visible = True
button_visible1 = True
button_visible2 = True
points = 0
unlock_button2_points = 3
screen gasolinestation():
add "Images/mapscreens/backround.png"
imagebutton:
focus_mask True
xalign 0.560
yalign 0.900
auto "Images/Arrows/Arrowup_%s.png" action [ToggleScreen("gasolinestation"), Jump("gasoline_1")]
screen store():
add "images/mapscreens/sto.png"
#3
if button_visible2 and points < unlock_button2_points:
imagebutton:
focus_mask True
auto "images/Mapscreens/stot_%s.png" action [ToggleScreen("store"), Jump("cashier_1"), SetVariable("points", points + 1)]
imagebutton:
xalign 0.860
yalign 0.550
focus_mask True
auto "images/arrows/arrowright_%s.png" action [ToggleScreen("store"), Jump("gasolinerestroom_1")]
imagebutton:
xalign 0.560
yalign 0.900
focus_mask True
auto "images/arrows/arrowdown_%s.png" action [ToggleScreen("store"), Jump("gasoline_2")]
screen gasrestroom():
add "sscene5"
#Unlockhere
if points >= unlock_button2_points:
imagebutton:
focus_mask True
auto "images/mapscreens/Reestromin_%s.png" action [ToggleScreen("gasrestroom"), Jump("reestromin")]
imagebutton:
focus_mask True
xalign 0.100
yalign 0.900
auto "images/arrows/arrowleft_%s.png" action [ToggleScreen("gasrestroom"), Jump("gasoline_1")]
imagebutton:
focus_mask True
auto "images/mapscreens/backdoor_%s.png" action [ToggleScreen("gasrestroom"), Jump("gasbackdoor")]
imagebutton:
xalign 0.850
yalign 0.900
focus_mask True
auto "images/arrows/arrowright_%s.png" action [ToggleScreen("gasrestroom"), Jump("momstore_1")]
screen backdoor1():
add "worksh1"
imagebutton:
xalign 0.500
yalign 0.900
focus_mask True
auto "images/arrows/arrowdown_%s.png" action [ToggleScreen("backdoor1"), Jump("gasolinerestroom_1")]
imagebutton:
focus_mask True
auto "workshopdoor_%s.png" action [ToggleScreen("backdoor1"), Jump("workshop1")]
screen workshop_1():
add "worksh2"
#2
if button_visible1 and points < unlock_button2_points:
imagebutton:
focus_mask True
auto "scottbutton_%s.png" action [ToggleScreen("workshop_1"), Jump("workshop2"), SetVariable("points", points + 1)]
imagebutton:
focus_mask True
xalign 0.500
yalign 0.900
auto "images/arrows/arrowdown_%s.png" action [ToggleScreen("workshop_1"), Jump("gasbackdoor")]
screen momstore1():
add "mumstor1"
#1
if button_visible and points < unlock_button2_points:
imagebutton:
focus_mask True
auto "mombutton1_%s.png" action [ToggleScreen("momstore1"), Jump("momstore_2"), SetVariable("points", points + 1)]
imagebutton:
focus_mask True
xalign 0.100
yalign 0.900
auto "images/arrows/arrowleft_%s.png" action [ToggleScreen("momstore1"), Jump("gasolinerestroom_1")]
Last edited: