Code: Select all
init -1:
# ATLS
transform tf_throw_ball():
subpixel True
xpos 960
ypos 1080
rotate -360
linear 0.5 xpos 0 ypos 0 rotate 720
screen doit():
imagebutton:
action Return("light1")
idle images['light_off']
xpos 400
ypos 0
imagebutton:
action Return("light1")
idle images['light_off']
xpos 800
ypos 0
imagebutton:
action Return("light1")
idle images['light_off']
xpos 1200
ypos 0
text "%s" % outcome xpos 100 ypos 100 color '#000'
screen render_ball():
add images['ball'] at tf_throw_ball()
label start():
scene bg background
default outcome = 0
while True:
call screen doit()
$ res = _return
if res:
show screen render_ball()
$ renpy.pause(0.5)
$ outcome += 5
hide screen render_ball
return
However, when renpy pauses to allow for the animation to run, all of the lights in the doit() screen disappear, and I only see the ball move across the screen. When the ball gets hidden, the lights show up again.
Is there something wrong with the code? Why does the ball animation not show with the lights at the same time?