Need help on bringing up a map with a key
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Need help on bringing up a map with a key
So for my game, I wanna have a map that you can bring up when you hit a key, sort of like a function. Can anyone point me to where I'd figure out how to do that? Thanks.
Current Project: Alter Ego
- papiersam
- Veteran
- Posts: 231
- Joined: Fri Aug 12, 2016 2:24 pm
- Completed: Gem Hunt Beta, 1/Probably, Animunch
- Projects: The Panda Who Dreamed
- Contact:
Re: Need help on bringing up a map with a key
You can either set the _game_screen_menu to the map screen (which will replace the game menu), or you can have a key assigned to call the screen, something like:
Here, pygame keys are used to assign the screen to the 'a' key.
Hope that helps.
Code: Select all
key "K_a" action Show("mapscrn", transition=dissolve)
Hope that helps.
Re: Need help on bringing up a map with a key
I just tried to do this, but it's giving me the end of line expected error. Am I supposed to put it in the script file or somewhere else?
Current Project: Alter Ego
- papiersam
- Veteran
- Posts: 231
- Joined: Fri Aug 12, 2016 2:24 pm
- Completed: Gem Hunt Beta, 1/Probably, Animunch
- Projects: The Panda Who Dreamed
- Contact:
Re: Need help on bringing up a map with a key
It goes inside a screen, so something like
If that doesn't work, you could try to append the function to the keymap.
Code: Select all
screen bckgrnd:
key "K_a" action Show("mapscrn", transition=dissolve)
label start:
show screen bckgrnd
"Now you can call the screen in the background."
Re: Need help on bringing up a map with a key
What exactly do you put in the parenthesis? is that an image you declare, cuz it seems to be responding to my input, but it's saying that the screen doesn't exist.
Also, let me explain what I'm trying to do so I can solve it all in one go. Each label (which in my game represents a room), the player can bring up the map but will show a different map (the map's gonna have a red dot showing where you are). So each label needs to be able to pull a different image I have setup. If you can help me with this, that'd be great.
Thanks again.
Also, let me explain what I'm trying to do so I can solve it all in one go. Each label (which in my game represents a room), the player can bring up the map but will show a different map (the map's gonna have a red dot showing where you are). So each label needs to be able to pull a different image I have setup. If you can help me with this, that'd be great.
Thanks again.
Current Project: Alter Ego
Who is online
Users browsing this forum: Adabelitoo, Semrush [Bot]