[Solved] Disabling interaction without blocking the player from quitting.
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.
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.
[Solved] Disabling interaction without blocking the player from quitting.
So, I have a part in my visual novel where a "cinematic" plays, but its not a .ogv but instead multiple images who play at rhythm with the music, this because a cinematic is much heavier and because like that i can change anything without making a new video. For reference it looks like the image below:
So, the thing is that if the player touches anything all the pacing gets ruined, so what I use to prevent interaction is $ disable_interaction(). The problem with this is that when using this command, if the player wants to exit the game it wont let them, and alt+f4 will lead to the application stop working, and the only way to get the game to close is to forcequit it multiple times trough the control panel. Any idea on a solution to this problem? Either making the player able to quit, or any other creative solution which could resolve this problem is welcome.
So, the thing is that if the player touches anything all the pacing gets ruined, so what I use to prevent interaction is $ disable_interaction(). The problem with this is that when using this command, if the player wants to exit the game it wont let them, and alt+f4 will lead to the application stop working, and the only way to get the game to close is to forcequit it multiple times trough the control panel. Any idea on a solution to this problem? Either making the player able to quit, or any other creative solution which could resolve this problem is welcome.
Last edited by simba975 on Fri Oct 27, 2023 7:08 pm, edited 1 time in total.
Re: Disabling interaction without blocking the player from quitting.
You can use ATL for that. This way you can simply show your cinematic as an image. You can apply hard pause to wait.simba975 wrote: ↑Wed Sep 06, 2023 10:55 pm So, I have a part in my visual novel where a "cinematic" plays, but its not a .ogv but instead multiple images who play at rhythm with the music, this because a cinematic is much heavier and because like that i can change anything without making a new video. For reference it looks like the image below:
So, the thing is that if the player touches anything all the pacing gets ruined, so what I use to prevent interaction is $ disable_interaction(). The problem with this is that when using this command, if the player wants to exit the game it wont let them, and alt+f4 will lead to the application stop working, and the only way to get the game to close is to forcequit it multiple times trough the control panel. Any idea on a solution to this problem? Either making the player able to quit, or any other creative solution which could resolve this problem is welcome.
Example:
Code: Select all
image cinematic:
# to apply transition
"some_image" with dissolve
# to wait
1.0
# to apply transform
At("some_image", blurin)
1.0
# to show text
Text("Meanwhile", align = (0.5,0.5), size=50)
1.0
# show composite image:
Composite((1920, 1080), (0,0), "some_image", (0,0), "eileen happy.png")
Code: Select all
show cinematic
$ renpy.pause(5.0, hard = True)
"End"
Re: Disabling interaction without blocking the player from quitting.
Thank you! There still is one problem though, for some reason, when the image changes after the select time, you can see the previously shown image for one frame.
For example:
Image code:
Code to show in script:
In this case, when the image changes from "e0m1b" to "e0m2 movie", you can see "e1bed3 when transitioning between them for one frame. I tried using scene before reproducing the cinematic, but it shows an empty png instead. How can I fix it?
For example:
Image code:
Code: Select all
image cinematic2:
"e0m1b" with Fade(0.25, 0.0, 0.172916)
At("e0m1b", drunk)
1.0
"e0m2 movie" with Fade(0.25, 0.0, 0.172916)
Code: Select all
scene e1bed3
""
show noise onlayer noise
show cinematic2
$ renpy.pause(5.0, hard = True)
""
Re: Disabling interaction without blocking the player from quitting.
Not sure.
Why do you start the cinematic with transition (what it should fade from)
Code: Select all
image cinematic2:
"e0m1b" with Fade(0.25, 0.0, 0.172916)
Code: Select all
image cinematic2:
"e0m1b"
At("e0m1b", drunk) with Fade(0.25, 0.0, 0.172916)
Code: Select all
define fade1 = Fade(0.25, 0.0, 0.172916)
Re: Disabling interaction without blocking the player from quitting.
The fade on the first image was by accident and it didn't do nothing so I didn't notice. Thank you for the advice on the custom fade define though. For the 0.172916, it needs to be exactly like that for the images to transition in the same timing as the music.
The "previous image showing between the transition" problem still persists though.
My code looks like this now:
Any idea why it could happen? Or should I maybe mark this as solved and start a new topic with the question?
The "previous image showing between the transition" problem still persists though.
My code looks like this now:
Code: Select all
image cinematic2:
"e0m1b"
At("e0m1b", drunk)
1.0
"e0m2 movie" with fadep
Re: Disabling interaction without blocking the player from quitting.
You can start a new topic if you'd like. It may help other people who may encounter the same problem.simba975 wrote: ↑Sat Sep 09, 2023 12:17 am The fade on the first image was by accident and it didn't do nothing so I didn't notice. Thank you for the advice on the custom fade define though. For the 0.172916, it needs to be exactly like that for the images to transition in the same timing as the music.
The "previous image showing between the transition" problem still persists though.
My code looks like this now:Any idea why it could happen? Or should I maybe mark this as solved and start a new topic with the question?Code: Select all
image cinematic2: "e0m1b" At("e0m1b", drunk) 1.0 "e0m2 movie" with fadep
Anyway,
Code: Select all
image cinematic2:
"e0m1b"
At("e0m1b", drunk)
Concerning the problem:
it is hard to say without knowing transform drunk and what is definition of "e0m2 movie"(Is it just an image or movie sprite or something else?)
Re: Disabling interaction without blocking the player from quitting.
"e0m2 movie" is an ogv (video). Its code is: image e0m2 movie = Movie(play="e0m2.ogv")You can start a new topic if you'd like. It may help other people who may encounter the same problem.
Anyway,image "e0m1b" is immediately replaced by At("e0m1b", drunk). You can add a delay or remove "e0m1b" from the first line.Code: Select all
image cinematic2: "e0m1b" At("e0m1b", drunk)
Concerning the problem:
it is hard to say without knowing transform drunk and what is definition of "e0m2 movie"(Is it just an image or movie sprite or something else?)
Now that you mentioned it i tried it with a normal image and it works fine, both with and without the transitions and the transform (fadep and drunk).
The problems come with the video, when transitioning from any image to any video the previous image can be seen between them. However, this is only the first time that video is played. If i play the same video a second time in the cinematic the problem disappears. However if i play a different video for the first time the problem comes again.
For example:
Code: Select all
image cinematic2:
At("e0m1b", drunk)
1
"e0m3" with fadep
1
"e0m4 movie"
1
"e0m1b"
1
"e0m4 movie" with fadep
1
"e0m2 movie"
1
"e0m1b"
1
"e0m4 movie"
I also tried calling the video before it is played like this:
Code: Select all
At("e0m1b", drunk)
1
"e0m4 movie"
"e0m3" with fadep
1
"e0m4 movie"
I literally have no idea what is happening, i tried making the same problem by calling show instead of scene in my previous code but even then it works fine:
Code: Select all
scene e0m3 at drunk
show noise
with Dissolve(1)
$ renpy.pause(1, hard=True)
""
show e0m1b
show noise
play music "audio/dizzy_dream.ogg"
"{w=3}{nw}"
show e0m2 movie at blur2
show noise
with Fade(0.25, 0.0, 0.172916)
"{w=3}{nw}"
Re: Disabling interaction without blocking the player from quitting.
It likely happens because the playback has started, but the first frame has not yet been decoded. You can use start_image for the Movie to avoid it:simba975 wrote: ↑Sun Sep 10, 2023 1:04 pm "e0m2 movie" is an ogv (video). Its code is: image e0m2 movie = Movie(play="e0m2.ogv")
Now that you mentioned it i tried it with a normal image and it works fine, both with and without the transitions and the transform (fadep and drunk).
The problems come with the video, when transitioning from any image to any video the previous image can be seen between them. However, this is only the first time that video is played. If i play the same video a second time in the cinematic the problem disappears. However if i play a different video for the first time the problem comes again.
Code: Select all
image e0m2 movie = Movie(play="e0m2.ogv", start_image = "start_image")
Who is online
Users browsing this forum: Donmai, Google [Bot]