- Sep 26, 2018
- 3,131
- 3,195
trying to create a map how to make it action SetVariable(name, value) i have tried SetVariable("location", "Livingroom") it didn't
class.rpy
map screen
look at #
class.rpy
Python:
class places(object):
def __init__(self,name,cost, UnLocked):
self.name = name
self.cost = cost
self.UnLocked = UnLocked
Rooms = []
Rooms.append(places("livingroom", 0, True))#done
Rooms.append(places("kitchen", 0, True))#done
Rooms.append(places("bathroom", 0, True)) #done
Rooms.append(places("motherBedroom", 0, True))#done
Rooms.append(places("mybedroom", 0, True)) #done
Rooms.append(places("twinbedroom", 0, True))#done
location = Rooms[0].name
look at #
Python:
screen maps():
add "images/town_map.png"
imagebutton:
ypos 340
xpos 400
idle "map_buttons/map_home.png"
hover "map_buttons/map_home_h.png"
action SetVariable("Location", "livingroom") #goes to the livingroom
imagebutton:
xpos 1100
ypos 150
idle "map_buttons/map_school.png"
hover "map_buttons/map_school_h.png"
action SetVariable("Location", "schooll_hallway")#goes to the livingroom instead of the school hallway
Last edited: