Here's what I'm trying to do. I have a map screen with locations you can select. When you select a location it should confirm your selection if certain requirements are met. Right now its based on the time period you are in (I've chopped up and integrated the dating engine). If you don't meet the requirements a notify screen informs you of the reason why. Selecting "no" on the confirm or failing to meet the requirements should keep you on the map screen. If you select yes and meet the requirements, you are transferred to an event which handles the rest.
I'd really appreciate if someone could look at my code and then explain to me what I'm doing wrong and any theory I'm missing. I feel like I'm just not getting the proper way to do all of this and I've been all through the documentation.
Here is the code I have so far. It "almost" works but it feels janky. Right now the biggest issue is the notify doesn't show over my map. I do see it though If I back out of it into another location so I know it's there.
Code: Select all
label map:
scene map_ground
call screen mapscreen
label location_cove:
if period == "morning" or period == "afternoon":
$ act = "visit_cove"
call screen confirm("Visit the cove?", Jump('doevent'), Jump('map'))
else:
show screen notify("Its a little late to visit the cove. I don't want to get stuck outside after dark.")
jump map
Code: Select all
screen mapscreen():
frame:
xsize 1920
ysize 1080
xpos 0
ypos 0
background "map_ground.png"
imagebutton auto "gui/map_icon_%s.png" action Hide('map') xpos 0 ypos 0 focus_mask True
imagebutton auto "gui/map_camp_%s.png" action Jump('LocationCamp') xpos 1125 ypos 675 focus_mask True
imagebutton auto "gui/map_mermaid_%s.png" action Jump('location_cove') xpos 1495 ypos 549 focus_mask True
Thanks!
*EDIT-
In case it matters, here is the code that launches the map screen:
Code: Select all
label TentInterior:
#What image should we display based on time of day?
if period == "morning":
scene bg tent
elif period == "afternoon":
scene bg tent
elif period == "evening":
scene bg tent
elif period == "night":
scene bg tent
if tent_first == False:
hide screen gameui
show mc_base at right
amber "Here is my tent"
hide mc_base
$ tent_first = True
show screen gameui
call screen campinterior
screen campinterior():
zorder 90
frame:
xsize 1920
ysize 1080
xpos 0
ypos 0
background None
imagebutton auto "tent_map_%s.png" action Jump('map') xpos 106 ypos 2 focus_mask True