I'm trying to have a status message drop in from offscreen, wait a few seconds, then float up offscreen.
The problem: If I use "call screen stat_drop" it displays properly, dropping in, waiting, then floating off, but the default text area at the bottom disappears, and control is never returned to the main program. It displays "1", the status message, then becomes unresponsive and never shows "2".
If I use "show screen stat_drop", then it never shows the stat screen, just goes through 1,2,3,4
I've spent weeks coding data structures as classes in Python, creating game sprites, imagebuttons (with the help of the excellent Renpy Imagebuttons GUI Sample), and opening screens to show character stats. Those work well, and I'm pretty good at programming in procedural languages, but the logic of screens language often still confounds me. I've isolated the problem section into its own project (shown below) but still can't figure it out. I'd really appreciate some help. Thanks!
Code: Select all
init python:
actiontext = "Stats increase by 50" # Sample status message to display
screen stat_change: # Screen for showing stat change message
text (actiontext) size 30: # Display string with size 30, use transform to drop in and drop out
at drop_status
init:
image bg blueDream = "gui/BackgroundBlueDream.jpg"
label start: # ■██▓▒░ START LABEL ░▒▓████████████████████████████████████■
show bg blueDream # Show background
"1"
call screen stat_change # Drop status message text
"2"
hide screen stat_change # Hide status message text
"3"
"4"
init -2:
transform drop_status:
xpos 350 ypos -300 # Start above the visible screen
easeout 1.0 ypos 50 # Drop down to 50 pixels from the tops to show status message
2.5 # 2.5 second Pause
linear 3.0 ypos -300 # Go back above the visible screen in 3 seconds to hide status message
transform drop_status2: # Second attempt at making stat_drop return control
on show:
xpos 350 ypos -300
easeout 1.0 ypos 50
2.5 # 2.5 second Pause
on hide:
linear 3.0 ypos -300