Hi!
Here's what I would do. I added a variable, "area", so we can remember where we are. Then, instead of making a screen for each room, we simply change what's shown depending on where we are. This way, we don't have to hide everything.
Code: Select all
screen movement:
style_prefix "choice"
modal True
vbox:
if area == "bedroom":
add "bedroom empty.png" ##This will show your background for the room you are in.
textbutton "My PC": ##You can change this to be your image button code! This is just for testing purposes.
action [SetVariable("area", "pc"),Jump("room")] ##I'll explain the Jump later on.
textbutton "Hallway":
add "hallway empty.png"
action [SetVariable("area", "hallway"),Jump("room")]
elif area == "pc":
add "pc empty.png"
textbutton "Bedroom":
action [SetVariable("area", "bedroom"),Jump("room")]
elif area == "hallway":
textbutton "Bedroom":
action [SetVariable("area", "bedroom"), Jump("room")]
textbutton "Kitchen":
action [SetVariable("area", "kitchen"),Jump("room")] ##blah blah blah etc.
else:
pass
Now, I set the Variable (area) to change when we click the button its on. After, we jump to a place called "room".
Code: Select all
label room:
show screen movement
show screen minimap
$ renpy.pause(hard=True)
Here's the empty room. It will have the background change based on the "area" variable. This is good for just testing movement, because there's no way to really add story. For a navigation system though, this is all you'll need.
When you have all the rooms you want coded in, you can add story bits depending on where you are if you want!
The way you can do this is change the
to make it jump to scenes.
Here's an example of how to show the first scene of the game by going to the PC.
First, we will set a variable to tell the game that we haven't seen the first scene yet. Once you're more comfortable with Ren'py, you could set this based on something like if you've visited a certain area three or more times or something, but this is the simplest example.
Code: Select all
label start:
$ scene1 = False
$ area = bedroom
label bedroom:
scene bedroom
Pretty easy. When the game begins, we know that we haven't seen the first scene yet, and that we started out in the bedroom.
Now, we'll change the Jumps so they all correspond correctly.
Code: Select all
screen movement:
style_prefix "choice"
modal True
vbox:
if area == "bedroom":
textbutton "My PC":
action [SetVariable("area", "pc"),Jump("pc")
textbutton "Hallway":
action [SetVariable("area", "hallway"),Jump("hallway")]
elif area == "pc":
textbutton "Bedroom":
action [SetVariable("area", "bedroom"),Jump("bedroom")]
elif area == "hallway":
textbutton "Bedroom":
action [SetVariable("area", "bedroom"), Jump("bedroom")]
textbutton "Kitchen":
action [SetVariable("area", "kitchen"),Jump("kitchen")]
else:
pass
Notice I took out the "add bedroom_empty.png" lines. That's because we'll jump to scenes now.
For the first scene, we'll start with the MC in his bedroom. To get the story, we must go to the pc.
Code: Select all
label pc:
scene pc_empty
if scene1 == False: ##Or, "if we haven't seen this yet..."
"This is the first scene of the game."
"Now, I'll show the minimap and movement screens."
$scene1 = True ##This will remember that we saw the first now, and when we return to the bedroom by navigation, it won't play again.
else: ##Or, "If we've already seen this...
pass ##Do nothing.
jump room_movement
The room_movement label will just show the screens we want. This way, during story, we can't accidentally click and leave the room.
Code: Select all
label room_movement:
show screen movement
show screen minimap
$ renpy.pause(hard=True)
And then you can continue this way by making scenes correspond to the areas and creating flags. Scene1, scene2, etc are hard variables to remember if you have branching, so it might be best to name them something easier to remember.
I hope this helped and it wasn't too confusing! I'm sorry I can't help out with the minimap, but you should be able to just "show screen minimap" and it should stay unless you tagged it or something.