I got a nice scene on video with three different camera angles, and three different speeds for each camera angle.
I want the player to be able to cycle through the camera angles and select the speed, so I made the code below, and it mostly works but it shows some strange behaviour
for example if I don't try to cycle through the angles (scenes of different angle) the speed controls work fine and im able to jump again to the same label and thanks to the IF statement load the correct scene at correct speed, but if click on fast or slow and then click on angle it doesn't jump to the other sex2 or sex3 label on the first try, I have to click twice or thrice.
Another weird thing, once Im in a different angle scene if I try to use the speed controls it jumps to the next or previous angle scene first then the speed controls work fine.
Screen code:
scene code:
I know the code looks like crap, but that's the best i could come up with, any help would be greatly appreciated.
I want the player to be able to cycle through the camera angles and select the speed, so I made the code below, and it mostly works but it shows some strange behaviour
for example if I don't try to cycle through the angles (scenes of different angle) the speed controls work fine and im able to jump again to the same label and thanks to the IF statement load the correct scene at correct speed, but if click on fast or slow and then click on angle it doesn't jump to the other sex2 or sex3 label on the first try, I have to click twice or thrice.
Another weird thing, once Im in a different angle scene if I try to use the speed controls it jumps to the next or previous angle scene first then the speed controls work fine.
Screen code:
Code:
#images/videos
image sex v01 = Movie(group = "sex", size=(1920,1080), play = "videos/sex_vid01.webm", loop=True)
image sex v02 = Movie(group = "sex", size=(1920,1080), play = "videos/sex_vid02.webm", loop=True)
#and so on
#variables
default animation = 1 #starting animation
default angles = 1 #star angle
default top_speed = 1 #max number of speeds available
default speed_int = 1 #starting speed
default def_scene = Null #default scene, set later through variable
default scene_end = Null #ending scene, set later through a variable
#screen
label multiview_test:
screen viewangle():
imagebutton: #this button cycles thorugh the different angles
yalign 0.4
xalign 0.99
auto ("images/camera_%s.webp")
action (If( animation < angles, SetVariable( "animation", animation + 1 ), SetVariable( "animation", 1 ) ), Jump(def_scene + str(animation)))
if speed_int < top_speed:
#textbutton "Fast": #this button changes the start speed then jumps to the desired label
imagebutton:
xalign 0.99 yalign 0.5
auto ("images/fast_%s.webp")
action (If( speed_int < top_speed, SetVariable( "speed_int", speed_int + 1 )), Jump(def_scene + str(animation)))
if speed_int >= 2:
#textbutton "Slow":
imagebutton:
xalign 0.99 yalign 0.6
auto ("images/slow_%s.webp")
action (If( speed_int >= top_speed - 1, SetVariable( "speed_int", speed_int - 1 )), Jump(def_scene + str(animation)))
pass
else:
imagebutton:
xalign 0.99 yalign 0.6
auto ("images/slow_%s.webp")
action (If( speed_int >= top_speed - 1, SetVariable( "speed_int", speed_int - 1 )), Jump(def_scene + str(animation)))
if speed_int == top_speed:
imagebutton:
xalign 0.99 yalign 0.7
auto ("images/finish_%s.webp")
action Jump(scene_end)
pass
pass
Code:
label sex0:
show screen viewangle
$ animation = 1
$ angles = 3
$ top_speed = 3
$ speed_int = 1
$ def_scene = "sex"
$ scene_end = "finish_sex"
label sex1:
if speed_int == 1:
show sex v01 with dissolve:
zoom 0.667
"[speed_int]"
elif speed_int == 2:
show sex v02 with dissolve:
zoom 0.667
"[speed_int]"
elif speed_int == 3:
show sex v03 with dissolve:
zoom 0.667
"[speed_int]"
pass
label sex1_loop:
mc "Test1"
jump sex1_loop
label sex2:
if speed_int == 1:
show sex v04 with dissolve:
zoom 0.667
"[speed_int]"
elif speed_int == 2:
show sex v05 with dissolve:
zoom 0.667
"[speed_int]"
elif speed_int == 3:
show sex v06 with dissolve:
zoom 0.667
"[speed_int]"
pass
label sex2_loop:
mc "Test1"
jump sex2_loop
label sex3:
if speed_int == 1:
show sex v07 with dissolve:
zoom 0.667
"[speed_int]"
elif speed_int == 2:
show sex v08 with dissolve:
zoom 0.667
"[speed_int]"
elif speed_int == 3:
show sex v09 with dissolve:
zoom 0.667
"[speed_int]"
pass
label sex3_loop:
mc "Test1"
jump sex3_loop