So I have a tonload (not really) of potential images I want to show one of based on a random number. Here's what I have so far...
I can make up a declared image name like so:
Code: Select all
$ num = renpy.random.randint(1, 20)
$ thing = "thingy" + str(num)
[thing] now contains "thingy17" or whatever which is an image (image thingy17 = "thingy17.png").
Is there some way to call [thing] as in:
Given that's possible, is there some way to also declare the image on the fly, e.g. similar to:
Code: Select all
image thing = "thingy" + str(num) + ".png"
show thing
I know this is a bit weird, but I seriously don't want a huge nested if or a huge 'choice' statement. Drag to write, drag to debug, drag to document. Thanks for the help... Still learning... Still a newb.