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.
-
Jetar
- Newbie
- Posts: 8
- Joined: Sat May 21, 2022 10:05 am
-
Contact:
#1
Post
by Jetar » Fri Oct 28, 2022 6:50 pm
This. I have image statement with ConditionSwitch:
Code: Select all
image something = ConditionSwitch(
"x == 1","images/thing_1.jpg",
"x == 2","images/thing_2.jpg",
"x == 3","images/thing_3.jpg",
"x == 4","images/thing_4.jpg",
)
And I have screen with imagemap:
I want to go DRY and reuse
image something into the ground argument of
imagemap statement. Can I do that? I've done some googing and it shows nothing.
Last edited by
Jetar on Fri Oct 28, 2022 7:29 pm, edited 1 time in total.
-
laure44
- Regular
- Posts: 60
- Joined: Mon Mar 08, 2021 10:55 pm
- Projects: Arkan'sTower, Gemshine Lorelei!
- Location: France
-
Contact:
#2
Post
by laure44 » Fri Oct 28, 2022 7:02 pm
You can simply use the name of the image you defined, inside quotes.
-
Jetar
- Newbie
- Posts: 8
- Joined: Sat May 21, 2022 10:05 am
-
Contact:
#3
Post
by Jetar » Fri Oct 28, 2022 7:28 pm
That worked! Thank you!
Users browsing this forum: Bing [Bot]