Ok, so after reading the title you're probably scratching your head.
As I mentioned in my first post, I'm using background images for all bgs and sprites, and I'm using sprite images for speech bubbles and exposition text. This means that with the right naming convention I should be able to have a single function display whole segments of the story.
So what I want to do is something like this:
While screencount > 0
image scenebg = "ch1" + screendisplay + ".png"
scene scenebg
pause 0.2
if loadable ("ch1" + screendisplay + "x1.png")
image expo1 = "ch1" + screendisplay + "x1.png"
show expo1
pause 0.2
if loadable ("ch1" + screendisplay + "t1.png")
image text1 = "ch1" + screendisplay + "t1.png"
show text1
pause
if loadable ("ch1" + screendisplay + "t2.png")
image text2 = "ch1" + screendisplay + "t2.png"
show text2
pause
screendisplay += 1
screencount -=1
Ok, so this snippet likely isn't accurate, but it's a high level description of what I'm trying to achieve. If I can loop this for each chapter, I'll be set because choices are only going to happen at the end of each chapter.
Any help is greatly appreciated!
Is it possible to manipulate string variables and have the resultant string point to an image?
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.
- Remix
- Eileen-Class Veteran
- Posts: 1628
- Joined: Tue May 30, 2017 6:10 am
- Completed: None... yet (as I'm still looking for an artist)
- Projects: An un-named anime based trainer game
- Contact:
Re: Is it possible to manipulate string variables and have the resultant string point to an image?
Though it doesn't answer your entire question (the if loadable bits) you likely want to look at
default variable_name = "_variable_part"
image some_name = DynamicImage( "prefix[variable_name].png" )
default variable_name = "_variable_part"
image some_name = DynamicImage( "prefix[variable_name].png" )
Frameworks & Scriptlets:
- Speech Bubble dialogue system
- Multiple Notify with ATL and history
- (WIP) Radial Masking - needs updating to use Shader
- 7.4 - Smooth Tinting using ATL and matrixcolor
- Several other repositories there too
Who is online
Users browsing this forum: apocolocyntose, DewyNebula