Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
-
galadain
- Regular
- Posts: 31
- Joined: Wed Sep 09, 2020 4:24 pm
-
Contact:
#1
Post
by galadain » Sat Jun 26, 2021 12:07 am
I'd like to setup a imagemap where selecting a button calls a new screen for another image map.
Code: Select all
screen game1_p1():
imagemap:
ground "game1_p1_start.png"
hotspot (33, 210, 226, 93) action Call ("game1_p1_5")
hotspot (33, 318, 222, 98) action Call ("game1_p1_4")
screen game1_p1_5():
imagemap:
ground "game1_p1_5.png"
hotspot (33, 318, 222, 98) action Call ("game1_p1_4")
Calling the first screen works fine. How do I go directly to the next screen from WITHIN the imagemap?
-
galadain
- Regular
- Posts: 31
- Joined: Wed Sep 09, 2020 4:24 pm
-
Contact:
#2
Post
by galadain » Sat Jun 26, 2021 10:31 pm
Maybe this will clarify a bit.
I know I can do it this way by jumping to labels then calling new screens each time.
Code: Select all
label game1_p1_start:
call screen game1_p1
Code: Select all
screen game1_p1():
imagemap:
ground "game1_p1_start.png"
hotspot (33, 210, 226, 93) action Jump ("game1_p1_5")
hotspot (33, 318, 222, 98) action Jump ("game1_p1_4")
Code: Select all
label game1_p1_5:
call screen game1_p1_5
Code: Select all
screen game1_p1_5():
imagemap:
ground "game1_p1_5.png"
hotspot (33, 318, 222, 98) action Jump ("game1_p1_4")
Code: Select all
label game1_p1_4:
call screen game1_p1_3
But I'd rather not keep bouncing back and forth like that. There's got to be a better way to do this.
-
galadain
- Regular
- Posts: 31
- Joined: Wed Sep 09, 2020 4:24 pm
-
Contact:
#4
Post
by galadain » Sun Jun 27, 2021 11:34 am
Almost like a waterfall. At first the user has five button options to pick from. Then four and so on. They are only allowed three choices to get the correct combination. So if their choices are 5 to 1 and in round 1 the choose 4, then in round 2 their choices are 5, 3-1.
-
emz911
- Regular
- Posts: 103
- Joined: Fri Jun 23, 2017 2:23 pm
-
Contact:
#5
Post
by emz911 » Sun Jun 27, 2021 3:08 pm
You could make a Function that calls the passed screen name.
Another easier way is to use
instead, and give your screens a:
Users browsing this forum: No registered users