I just want to ask about using variables for scene image names.
My project has been getting quite large now so I want to bring things together into classes.
I have a particular environment object declared like this
Code: Select all
$Camp = Environment("Camp", renpy.image("bgCamp", "environments/camp.jpg"), 0, True, False)Code: Select all
scene Camp.background with dissolveMy environment class is defined like this
Code: Select all
class Environment:
def __init__(self, name, background, discoveryScore, discovered, visitable):
self.name = name # The name of the environment
self.background = background # The background image
self.discoveryScore = discoveryScore # The score needed to discover the land
self.discovered = discovered # Wether the land has been discovered or not
self.visitable = visitable # If the land can be visited or not
# Discover the environment
def discover(self):
self.discovered = True