Help
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.
Help
Hello.
I'm using imagemap to create a map of a city.
I want to make the possible choice to go to somewhere, witch I already did.
But now I have a problem.
If I pick park, on the park I want another button to go back to the map.
I could make the same, and if you click the go back button, the map image appears. But that would create an infinite loop, because in that map I'd have to program everything again.
So my question is, how do I make to when I pick the go back button, go back to the first map.
I'm using imagemap to create a map of a city.
I want to make the possible choice to go to somewhere, witch I already did.
But now I have a problem.
If I pick park, on the park I want another button to go back to the map.
I could make the same, and if you click the go back button, the map image appears. But that would create an infinite loop, because in that map I'd have to program everything again.
So my question is, how do I make to when I pick the go back button, go back to the first map.
Last edited by Skyleft on Sun Dec 22, 2019 1:05 pm, edited 1 time in total.
- deliciumartis
- Regular
- Posts: 30
- Joined: Mon Feb 09, 2015 11:32 am
- Location: shadowland
- Contact:
Re: Help
You could set up a label and clicking the "go back" button resets the switch and switches the view back the map. I'm not familiar with how you've set your calls up so I'm not sure on an exact answer.
"What bothers me is, nothin' does."
--The dixie flatline
--The dixie flatline
- deliciumartis
- Regular
- Posts: 30
- Joined: Mon Feb 09, 2015 11:32 am
- Location: shadowland
- Contact:
Re: Help
Okay, easy enough. Start with your variable.
then in your label that gets called after the button is clicked and $ location is supposed to change you can put:
finally, on your go back button:
Code: Select all
$ location == "None"
Code: Select all
##stuff before the variable change
$ location == "Park"
##stuff after the variable change, such as calling the new screen or label or image or what have you.
Code: Select all
##setting the location variable back to it's base so it can be changed again.
$ location == "None"
##then whatever else you have in your label function that happens, such as the call or jump back to the label or screen with your map.
"What bothers me is, nothin' does."
--The dixie flatline
--The dixie flatline
- deliciumartis
- Regular
- Posts: 30
- Joined: Mon Feb 09, 2015 11:32 am
- Location: shadowland
- Contact:
Re: Help
okay, put your code segments in between the code tags and I'll have a closer look, or you can pm them to me. I'll see if I can find the issue.
"What bothers me is, nothin' does."
--The dixie flatline
--The dixie flatline
Re: Help
I PMd you, but anyway
Code: Select all
$ result = renpy.imagemap("p1.png", "p2.png", [
(46, 392, 132, 471, "left"),
(370, 307, 444, 379, "pass"),
(682, 394, 756, 464, "right"),
], focus="imagemap")
if result == "pass":
show bg 2
#I'd like to here, put a image and when you click on it, it goes back to the beginning to choose left, pass and right again.
elif result == "left":
$ result2 = renpy.imagemap("pp1.png", "p111.png", [
(85, 51, 220, 204, "poster"),
(307, 324, 429, 385, "suitcase"),
(516, 315, 662, 388, "pass"),
], focus="imagemap")
if result2 == "pass":
y "text"
elif result == "right":
"
Who is online
Users browsing this forum: No registered users