Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Internally, the music room uses actions that include SetScreenVariable and similar to set the current_track screen variable to the correct value. When you use it inside another screen, it can't directly access that variable any longer (and would usually need to be accessed via SetLocalVariable or similar). 

Two ways around this - the simplest is just to move the screen variable to your parent screen and pass it into the music room screen e.g.

screen parent_music_room():
    tag menu
    default current_track = music_room.get_current_song()
    use music_room(music_room, current_track)

and then you'll want to update the music room to screen music_room(mr, current_track): and remove the default current_track = ... line from the music_room screen. 

Second would be to adjust your parent screen so it has a transclude statement, and then have the music_room screen use your parent screen and place its contents inside the use block so they're formatted appropriately. Then the music_room screen is the "top level" screen which owns the current_track variable.

Hope that helps!

(+1)

Thank you, I did the first solution and it worked like a charm!