Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Hello fellas! I need help making a skip function for this video, maybe when the player clicks on the video a pop up windows shows up asking them if they want to skip it? or maybe there's a 'skip cutscene' text button in the top right corner of the screen? whatever is easier IMO
I'm posting the code with the call screen text empty for the sake of this board's decency
Anastimafilia wrote: ↑Sun May 26, 2024 12:21 pm
Hello fellas! I need help making a skip function for this video, maybe when the player clicks on the video a pop up windows shows up asking them if they want to skip it? or maybe there's a 'skip cutscene' text button in the top right corner of the screen? whatever is easier IMO
So, I'm just using your code assuming you want to show those text elements while the movie plays.
image movie3 = Movie(play="images/petrawg.webm")
screen mytextscreen(what, t):
modal True
# when the player clicks anywhere, just ask them if they want to skip
dismiss action Confirm("Do you really wanna skip?", Jump("movie3.end"))
text what xalign 0.5 yalign 0.9 style "textstyle"
timer t action Return()
style textstyle:
outlines [(4, "#000000")] ## Make sure to have the [] or else you get an error.
label movie3:
show movie3:
pos (0, 0)
size (2560, 1440)
call screen mytextscreen("", 3.0)
call screen mytextscreen("", 3.0)
call screen mytextscreen("", 3.0)
call screen mytextscreen("", 3.0)
call screen mytextscreen("", 3.0)
call screen mytextscreen("", 3.0)
call screen mytextscreen("", 3.0)
call screen mytextscreen("", 3.0)
call screen mytextscreen("", 3.0)
call screen mytextscreen("", 3.0)
label .end:
hide movie3
return
P.S. You better not use the same name for both the movie and the label, this might confuse you and also is bad practice, since it can lead to strange behavior in certain circumstances.
thanks a lot for the help, the skip function does works but for some reason it got applied to all other movies which is fine but the game ends whenever any of the movies is skipped