Okay, here's the thing. I have a video based on several clips, each of them is triggered with a button that is unlocked by waiting a number of seconds after the start of the previous one. For that, I have a screen with timers, variables and buttons (maybe not the most efficient way to do this):
Code: Select all
screen op1sce1():
zorder 1
modal True
timer 4.00 action If(time > 0, true=SetVariable('time', time - 0.01), false=[SetField(o1, "f1", True)])
if o1.f2:
timer 10.00 action If(time > 0, true=SetVariable('time', time - 0.01), false=[SetField(o1, "f3", True)])
if o1.f4:
timer 7.00 action If(time > 0, true=SetVariable('time', time - 0.01), false=[SetField(o1, "f5", True)])
...
if o1.f1:
imagebutton:
at hp
idle "but/licktip.png"
hover "but/licktiph.png"
pos (30, 90)
action [Play("sound", "audio/clic.mp3"), SetField(o1, "f2", True), Show("op1sce1b")]
if o1.f3:
imagebutton:
at hp
idle "but/bothands.png"
hover "but/bothandsh.png"
pos (215, 90)
action [Play("sound", "audio/clic.mp3"), SetField(o1, "f4", True), Show("op1sce1c")]
if o1.f5:
imagebutton:
at hp
idle "but/deeper.png"
hover "but/deeperh.png"
pos (400, 55)
action [Play("sound", "audio/clic.mp3"), SetField(o1, "f6", True), Show("op1sce1d1")]
...Code: Select all
screen op1sce1a():
zorder 0
modal False
add Movie(size=(1600, 900))
on "show" action Play("movie", "vid/op1s1a.webm", loop=True)
on "hide" action Stop("movie")
screen op1sce1b():
zorder 0
modal False
add Movie(size=(1600, 900))
on "show" action Play("movie", "vid/op1s1b.webm", loop=True)
on "hide" action Stop("movie")
screen op1sce1c():
zorder 0
modal False
add Movie(size=(1600, 900))
on "show" action Play("movie", "vid/op1s1c.webm", loop=True)
on "hide" action Stop("movie")
screen op1sce1d1():
zorder 0
modal False
add Movie(size=(1600, 900))
on "show" action Play("movie", "vid/op1s1d1.webm", loop=True)
on "hide" action Stop("movie")
...Code: Select all
show screen op1sce1a
call screen op1sce1