[SOLVED] How to get the textbox to remain visible during sprite transitions??

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.
Post Reply
Message
Author
User avatar
RukaKurokawa
Newbie
Posts: 23
Joined: Thu Jan 03, 2013 2:39 pm
Projects: State of Presence
Organization: RK Sympathy
Deviantart: RukaKurokawa
Location: United States
Contact:

[SOLVED] How to get the textbox to remain visible during sprite transitions??

#1 Post by RukaKurokawa » Mon Mar 16, 2020 11:58 pm

As you've probably guessed... I'm having trouble with Ren'py.

Whenever I have a sprite enter mid-scene, the textbox has to go and hide itself - I don't know why. Maybe it's a part of the default transition? The textbox disappears temporarily and then dissolves back in, but it keeps the quick_menu visible. It looks awful.

Here's an example where it happens:

Code: Select all

"A tan couch and matching pair of armchairs huddled around a carved coffee table, my mug from last night still sat on the glass surface."
"Aside from a couple magazines and newspapers that came in the mail, there was nothing. No paper to be seen."
#call Kacper sprite
show kacper neutral happy half ee outthree at stayl with dissolve
kt "With all these magazines, I could use them as kindling and start a fire."
(If you're wondering why the line for the sprite is so long, I'm using layeredimage.)

I want the textbox to remain unaffected by the sprite entrance, but I don't know where to start with fixing it. If anyone could help me, I'd really appreciate it!
Last edited by RukaKurokawa on Wed May 27, 2020 3:25 am, edited 1 time in total.
Image
Produced by RK Sympathy - Logo by WinterMochie

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3001
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: How to get the textbox to remain visible during sprite transitions??

#2 Post by Imperf3kt » Tue Mar 17, 2020 12:13 am

dissolve should not do that, I see nothing wrong with your code that would cause it.

Just for testing, can you try using fade, or place the with dissolve on a new line by itself beneath your sprite show line.

I would expect fade to dissolve the entire screen.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
Free Android GUI - Updated occasionally

User avatar
RukaKurokawa
Newbie
Posts: 23
Joined: Thu Jan 03, 2013 2:39 pm
Projects: State of Presence
Organization: RK Sympathy
Deviantart: RukaKurokawa
Location: United States
Contact:

Re: How to get the textbox to remain visible during sprite transitions??

#3 Post by RukaKurokawa » Tue Mar 17, 2020 12:33 am

Imperf3kt wrote:
Tue Mar 17, 2020 12:13 am
dissolve should not do that, I see nothing wrong with your code that would cause it.

Just for testing, can you try using fade, or place the with dissolve on a new line by itself beneath your sprite show line.

I would expect fade to dissolve the entire screen.
Putting "with dissolve" on the next line results in the same thing.

And when I replace it with "with fade"...
After clicking, the textbox immediately disappears (still) and the whole screen fades to black. When it fades back in, it shows the sprite on its own before the textbox reappears. (The quick_menu also remains on screen when the textbox is gone, but it's overlayed by the black for a portion of the fade.)

In conclusion... I'm pretty sure the problem's occurring whether it's "dissolve" or "fade".
Image
Produced by RK Sympathy - Logo by WinterMochie

User avatar
rayminator
Veteran
Posts: 445
Joined: Fri Feb 09, 2018 12:05 am
Projects: Redoing games to fix spelling mistakes other companys that don't care
Location: Canada
Contact:

Re: How to get the textbox to remain visible during sprite transitions??

#4 Post by rayminator » Fri Mar 20, 2020 9:06 am

have you to tried window show

there is a bug when go image to image that textbox disappears for a few seconds even you use window show/hide or not using it cause the same error even using the option in option.rpy on line 98

Code: Select all

"A tan couch and matching pair of armchairs huddled around a carved coffee table, my mug from last night still sat on the glass surface."
"Aside from a couple magazines and newspapers that came in the mail, there was nothing. No paper to be seen."
#call Kacper sprite
show kacper neutral happy half ee outthree at stayl with dissolve
window show
kt "With all these magazines, I could use them as kindling and start a fire."
when I try to help someone I point them into 2 direction what's right and wrong so they can learn how to

User avatar
isobellesophia
Miko-Class Veteran
Posts: 978
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Re: How to get the textbox to remain visible during sprite transitions??

#5 Post by isobellesophia » Tue Mar 24, 2020 6:59 am

Try this, both textbox and the sprite may dissolve in together.

Code: Select all

show kacper neutral happy half ee outthree at stayl 
window show
with dissolve
I am a friendly user, please respect and have a good day.


Image

Image


User avatar
RukaKurokawa
Newbie
Posts: 23
Joined: Thu Jan 03, 2013 2:39 pm
Projects: State of Presence
Organization: RK Sympathy
Deviantart: RukaKurokawa
Location: United States
Contact:

Re: How to get the textbox to remain visible during sprite transitions??

#6 Post by RukaKurokawa » Mon May 25, 2020 9:29 pm

isobellesophia wrote:
Tue Mar 24, 2020 6:59 am
Try this, both textbox and the sprite may dissolve in together.

Code: Select all

show kacper neutral happy half ee outthree at stayl 
window show
with dissolve
I believe it's the transition itself. The problem doesn't occur when I remove the transition completely, but even when putting "window show" (in whatever place), the problem still occurs.

If I put it before the sprite line, it still disappears for a moment.
If I put it after, it disappears for longer.

I'm really not sure what to do about it. ;; There doesn't seem to be a way for me to include a transition while keeping the textbox in place!
Image
Produced by RK Sympathy - Logo by WinterMochie

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3001
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: How to get the textbox to remain visible during sprite transitions??

#7 Post by Imperf3kt » Mon May 25, 2020 10:47 pm

You could fake it. The text box is merely an image in the say screen, and since you can't stop the say screen disappearing, then just show the images themself.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
Free Android GUI - Updated occasionally

User avatar
hell_oh_world
Veteran
Posts: 376
Joined: Fri Jul 12, 2019 5:21 am
Projects: The Button Man
Organization: NILA
Github: hell-oh-world
Location: Philippines
Contact:

Re: How to get the textbox to remain visible during sprite transitions??

#8 Post by hell_oh_world » Mon May 25, 2020 11:39 pm

RukaKurokawa wrote:
Mon Mar 16, 2020 11:58 pm
As you've probably guessed... I'm having trouble with Ren'py.

Whenever I have a sprite enter mid-scene, the textbox has to go and hide itself - I don't know why. Maybe it's a part of the default transition? The textbox disappears temporarily and then dissolves back in, but it keeps the quick_menu visible. It looks awful.

Here's an example where it happens:

Code: Select all

"A tan couch and matching pair of armchairs huddled around a carved coffee table, my mug from last night still sat on the glass surface."
"Aside from a couple magazines and newspapers that came in the mail, there was nothing. No paper to be seen."
#call Kacper sprite
show kacper neutral happy half ee outthree at stayl with dissolve
kt "With all these magazines, I could use them as kindling and start a fire."
(If you're wondering why the line for the sprite is so long, I'm using layeredimage.)

I want the textbox to remain unaffected by the sprite entrance, but I don't know where to start with fixing it. If anyone could help me, I'd really appreciate it!
I'm guessing that dict transition would work in your case, since show statements are displayed on a different level of layer, you can manipulate which layer to affect when a transition happens, iirc.
https://www.renpy.org/doc/html/transiti ... ransitions

also, if I'm wrong with that... I looked through the docs and found that...
The with statement causes an interaction to occur. The duration of this interaction is controlled by the user, and the user can cause it to terminate early.
maybe, you need to control how the window / textbox should appear by using `window hide / show`.
https://www.renpy.org/doc/html/displayi ... how-window

User avatar
RukaKurokawa
Newbie
Posts: 23
Joined: Thu Jan 03, 2013 2:39 pm
Projects: State of Presence
Organization: RK Sympathy
Deviantart: RukaKurokawa
Location: United States
Contact:

Re: How to get the textbox to remain visible during sprite transitions??

#9 Post by RukaKurokawa » Wed May 27, 2020 3:25 am

hell_oh_world wrote:
Mon May 25, 2020 11:39 pm
I'm guessing that dict transition would work in your case, since show statements are displayed on a different level of layer, you can manipulate which layer to affect when a transition happens, iirc.
https://www.renpy.org/doc/html/transiti ... ransitions

also, if I'm wrong with that... I looked through the docs and found that...
The with statement causes an interaction to occur. The duration of this interaction is controlled by the user, and the user can cause it to terminate early.
maybe, you need to control how the window / textbox should appear by using `window hide / show`.
https://www.renpy.org/doc/html/displayi ... how-window
I had someone I know look at it, and they managed to solve the issue! You were definitely on the right track.

They said:
"In the labels, Ren'py puts the images not on the master layer (where they are supposed to be), but at the UI layer (which is where the textbox is). When you call a transition, you call the transition on a layer (in this case, the ui layer), so the textbox fades.
The solution is rather simple:"

Code: Select all

define dis = {"master" : Dissolve(0.5)}
"Define a custom transition as seen above and manually put the images at the right layer by saying:"

Code: Select all

show kacper neutral closed a outthree at stayl onlayer master with dis
I wanted to drop the solution here for anyone else that runs into this problem. Shoutout to Tamira for managing to solve the issue!!
Image
Produced by RK Sympathy - Logo by WinterMochie

User avatar
MaydohMaydoh
Regular
Posts: 165
Joined: Mon Jul 09, 2018 5:49 am
Projects: Fuwa Fuwa Panic
Tumblr: maydohmaydoh
Location: The Satellite of Love
Contact:

Re: [SOLVED] How to get the textbox to remain visible during sprite transitions??

#10 Post by MaydohMaydoh » Wed May 27, 2020 4:16 am

Just gonna say that adding "window auto" to the start of your script would stop the textbox disappearing.
window auto
This enables automatic management of the window. The window is shown before statements listed in config.window_auto_show – by default, say statements. The window is hidden before statements listed in config.window_auto_hide – by default, scene and call screen statements, and menu statements without a caption.

Post Reply

Who is online

Users browsing this forum: AdventAnyx, Google [Bot]