I was wondering if there was a way to find out which scene is currently active at any given moment. I'm making an adventure game where the player moves around a series of rooms, each room being a distinct scene, with its objects, characters, etc and it would be great if I could call the appropriate navigation/objects screen semi-automatically.
My current implementation is something like this:
Code: Select all
label room1:
scene room1
show screen navigation("room1")
show screen objects("room1")
call screen scrsetup #for inventory, etc.
screen objects(room):
if(room == "room1"):
...imagebuttons, etc...
if(room == "room2"):
...imagebuttons, etc...
which works, but I feel it's error-prone. I would be awesome if I could implement it like this (ideally with a function):
Code: Select all
label room1:
scene room1
show screen navigation()
show screen objects()
call screen scrsetup #for inventory, etc.
screen objects():
if(renpy.currentscene == "room1"):
...imagebuttons, etc...
if(renpy.currentscene == "room2"):
...imagebuttons, etc...