A simple navigation map tutorial
Forum rules
Do not post questions here!
This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Do not post questions here!
This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Re: A simple navigation map tutorial
Stupid question, but how can I make the choice available on a later scenario?
Re: A simple navigation map tutorial
I know this is an old thread but i am following this example to learn and while i could do it the problem is that my "hover" image doesn't show... i tried changing images andd sometimes it doesn't show and other it shows as a imageless square when hovered.
EDIT: I know what happened, my problem was that i was treating each hotspot as a single image and i was wrong, it is all 1 image that only shows certains parts of it when hovered not multiple images shown when hovered.
My other question still stands:
Also i wanted to ask how do you make a jump to another label in this case the main map to "fade" so it isn't an abrupt jump?
EDIT: I know what happened, my problem was that i was treating each hotspot as a single image and i was wrong, it is all 1 image that only shows certains parts of it when hovered not multiple images shown when hovered.
My other question still stands:
Also i wanted to ask how do you make a jump to another label in this case the main map to "fade" so it isn't an abrupt jump?
Re: A simple navigation map tutorial
I may have forgotten about this thread for years, but Google has not (still one of the first results for "Ren'Py imagemap").
So let's do a bit of cleaning by answering all pending questions.
First, please have a look at jane_runs_fast's Imagemaps explained by a dummy. It's a far more fresh and detailed tutorial on the same subject.
Second, a disclaimer: A long time ago, there was no screen language. In that dark time, imagemaps were pretty much the only way to customize menus properly, and were used and abused for pretty much anything.
Therefore, a lot of old tutorials advise to employ them, in their unfathomable complexity, for common use cases, like changing the look of choices and buttons.
While this may still technically work, nowadays we have ImageButton, a ton of customization options and the screen language as a whole.
And now for the actual questions:
So let's do a bit of cleaning by answering all pending questions.
First, please have a look at jane_runs_fast's Imagemaps explained by a dummy. It's a far more fresh and detailed tutorial on the same subject.
Second, a disclaimer: A long time ago, there was no screen language. In that dark time, imagemaps were pretty much the only way to customize menus properly, and were used and abused for pretty much anything.
Therefore, a lot of old tutorials advise to employ them, in their unfathomable complexity, for common use cases, like changing the look of choices and buttons.
While this may still technically work, nowadays we have ImageButton, a ton of customization options and the screen language as a whole.
And now for the actual questions:
Menus are standard screens defined in the screens.rpy file. You can add and remove buttons, and make them pretty much what you want, including jumping around.SBG_Eric wrote:Can I build this into a menu rather than using it directly in the game's Script.rpy file? The general idea would be to have an menu button that would take a player to the game's overland map for fast-travel.
Nope, reuse as you want to.noeinan wrote:Do you have any rules or requirements for how you would like the images or code used?
No need. Just use a single ground image with all planets squashed, then an idle image with all planets in one piece, and add a bunch of "if *_destroyed" conditions in your screen declaration. Ren'Py will recompose both images so the right one is shown to the user.marigoldsofthenight wrote:Let's say I want each planet to be able to be nullified like the earth. Do I need to make separate screens for each individual one?
Yes you can.Ishigreensa wrote:Question: Can I use?
screen choice:
imagemap:
if grab == 'xxx':
hotspot ( ) clicked Return('xxx')
or can I only use IF ... True in screen language?
Not sure I understand the question correctly, but you can always jump to their labels from anywhere, including from more standard choices.forsety wrote:Stupid question, but how can I make the choice available on a later scenario?
From the doc :Zeroth wrote:Also i wanted to ask how do you make a jump to another label in this case the main map to "fade" so it isn't an abrupt jump?
The call screen statement takes an optional with keyword, followed by a transition. The transition takes place when the screen is first displayed. A with statement after the transition runs after the screen is hidden, provided control is not transferred.
- DeathSummoner
- Regular
- Posts: 34
- Joined: Sun Feb 18, 2018 10:21 am
- Organization: PekoPeko
- Deviantart: pekopeko7
- Skype: MRA70181
- Location: Bangladesh
- Contact:
Re: A simple navigation map tutorial
i understood upto to hover,idle and ground images and how to find hotspot but after that theres clicked Jump part and the label start part which i didnot understand so can anyone pls make me understand what happened in those codings?
- AmityAngel
- Newbie
- Posts: 21
- Joined: Sat Sep 26, 2015 6:20 pm
- Completed: Ethereal Abyss
- Projects: Lost Girl in Dark Forest
- Organization: AngelQuarts
- Deviantart: angelquarts
- Skype: vhaagar
- Location: USA
- Discord: Zara#9245
- Contact:
Re: A simple navigation map tutorial
Man, this old 2013 tutorial just saved my project. Thank you so much, 8 years later
See, all I was trying to do in my game was make a simple map with click-able buttons that warp the player to the associated locations, and to hide the textbox on this map screen. Yet all I could find were imagebutton screen tutorials that said to "show screen" when calling them. Not only was I having countless problems with getting the imagebuttons to appear at all, being in the wrong location, not clicking/navigating properly, but I was having trouble hiding the textbox too. I'm admittedly a beginner with coding, but multiple people in the Discord tried to help to no avail. Still have no idea what I was doing wrong with the buttons.
And then I stumble upon this tutorial after hours and hours of frustration, and now all my problems are solved.
I didn't see anywhere else that all I needed to do was type "call screen" and not "show screen" and voila, the textbox would be hidden! I was being told to put in "modal True" which didn't work at all, haha. My map buttons now work perfectly as well, going exactly where they should be, and showing up in the proper places.
Sometimes newer isn't always better, especially when you just want to do something relatively simple.
For anyone else who comes across this thread and is only looking to make a screen for map/navigation purposes, do yourself a favor and use this imagemap screen instead of an imagebutton screen. Save yourself the headache and frustration. And for the love of god, use "call screen" to bring it up instead of "show screen"!
See, all I was trying to do in my game was make a simple map with click-able buttons that warp the player to the associated locations, and to hide the textbox on this map screen. Yet all I could find were imagebutton screen tutorials that said to "show screen" when calling them. Not only was I having countless problems with getting the imagebuttons to appear at all, being in the wrong location, not clicking/navigating properly, but I was having trouble hiding the textbox too. I'm admittedly a beginner with coding, but multiple people in the Discord tried to help to no avail. Still have no idea what I was doing wrong with the buttons.
And then I stumble upon this tutorial after hours and hours of frustration, and now all my problems are solved.
I didn't see anywhere else that all I needed to do was type "call screen" and not "show screen" and voila, the textbox would be hidden! I was being told to put in "modal True" which didn't work at all, haha. My map buttons now work perfectly as well, going exactly where they should be, and showing up in the proper places.
Sometimes newer isn't always better, especially when you just want to do something relatively simple.
For anyone else who comes across this thread and is only looking to make a screen for map/navigation purposes, do yourself a favor and use this imagemap screen instead of an imagebutton screen. Save yourself the headache and frustration. And for the love of god, use "call screen" to bring it up instead of "show screen"!
Who is online
Users browsing this forum: Zodiac_Stories