However, it calls other labels which uses the scene statement to setup the background image.
The game interaction loops around, so the backgrounds should be hidden/shown based on what label it's in. This works perfectly for the very first iteration, but all subsequent iterations will show the last scene first, and then immediately the next correct scene, if that makes sense.
Here is a simple demo of the issue:
Code: Select all
screen main():
add "images/bg black.jpg"
label one():
scene bg blue with fade
"showing blue"
return
label two():
scene bg orange with fade
"showing orange"
return
label start:
show screen main
$ x = 0
while x < 5:
"showing black"
hide screen main
call one()
call two()
show screen main
$ x += 1
return
1st iteration:
- Black background shows
- "showing black" displays
- Blue background shows
- "showing blue" displays
- Orange background shows
- "showing orange" displays
^^ Expected order of background image transitions.
2nd iteration:
- Black background shows
- "showing black" displays
- Orange background flashes briefly
- Blue background shows
- "showing blue" displays
- Orange background shows
- "showing orange" displays
^^ Incorrect order of background images... orange flashes briefly before transitioning into the blue.
And then it keeps repeating the 2nd iteration, where the orange flashes briefly, until the loop dies
Why is the orange showing up in between the black and blue scene transitions? Is there a way to fix this while keeping the way I am displaying my background images (ie, keeping "add" as the main and using "scene" in the label calls)?