Auto Text/Dialog Box? [Solved - Thank You!]

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
bDunks
Newbie
Posts: 21
Joined: Tue Jan 08, 2019 3:07 pm
Contact:

Auto Text/Dialog Box? [Solved - Thank You!]

#1 Post by bDunks »

Hello!
On occasion, I would simply like the dialog box to pop up with some text, then disappear on its own.
Is this possible?
I have tried the {nw} & even tried adding something like {nw=5.0}
But it disappears in a split second.
Thank you for your time. :)
Last edited by bDunks on Sun Mar 24, 2019 3:05 am, edited 2 times in total.

User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
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: Auto Text/Dialog Box?

#2 Post by isobellesophia »

Code: Select all

window hide

$ renpy.pause (2.0, hard=True)

window show

m "Some text."
or

Code: Select all

window show

$ renpy.pause (5.0, hard=True) <This will keep the textbox appear.

m "Some text."
I am a friendly user, please respect and have a good day.


Image

Image


bDunks
Newbie
Posts: 21
Joined: Tue Jan 08, 2019 3:07 pm
Contact:

Re: Auto Text/Dialog Box?

#3 Post by bDunks »

isobellesophia wrote: Sat Mar 23, 2019 8:06 pm

Code: Select all

window hide

$ renpy.pause (2.0, hard=True)

window show

m "Some text."
or

Code: Select all

window show

$ renpy.pause (5.0, hard=True) <This will keep the textbox appear.

m "Some text."
This code tells the game to wait x seconds before showing dialog.
What I am trying to find is a way for the dialog to show... Then wait x seconds before closing on its own.
No player interactions required.

i.e.

Code: Select all

scene image1
b "This is a neat store."
pause 2
b "Too bad it smells funny... {Magical code that waits x seconds before closing this dialog box}"
pause
I appreciate the response, though. :)

User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
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: Auto Text/Dialog Box? [Not Solved]

#4 Post by isobellesophia »

How about

Code: Select all

window show
b "Some text... {w=5.0} i should expand it instead.{nw=5.0}"

window hide

$ renpy.pause (2.0, hard=True)

window show 

b "Im back."


Orrrr maybe...

Code: Select all

window show

$ renpy.pause (X.0, hard=True)

window hide


I am not really good at this tho. Try this.
I am a friendly user, please respect and have a good day.


Image

Image


bDunks
Newbie
Posts: 21
Joined: Tue Jan 08, 2019 3:07 pm
Contact:

Re: Auto Text/Dialog Box? [Not Solved]

#5 Post by bDunks »

isobellesophia wrote: Sun Mar 24, 2019 1:35 am How about
OK, I first want to make some notes on your code & if I am wrong, please correct me. Merely for educations purposes. :)

Code: Select all

window show
b "Some text... {w=5.0} i should expand it instead.{nw=5.0}"		#I will get to this

window hide		#Not sure the purpose of this as pause will hide the window. UPDATE - Not True. Some code is doing this.

$ renpy.pause (2.0, hard=True)

window show		#Not sure the purpose of this as this will only briefly show a blank window...

b "Im back."		#...This is the window you want to see & will show automatically


Orrrr maybe...

Code: Select all

window show		#And... None of this will work... Ha ha..sorry!

$ renpy.pause (X.0, hard=True)

window hide


BUT!!!!
I do THANK YOU for this little gem!
{w=5.0}{nw}

So let's see how it work in my code, shown as an example above.

Code: Select all

scene image1
b "This is a neat store."
pause 2
b "Too bad it smells funny... {w=5.0}{nw}"	#Now the window closes after 5 seconds. Awesome!
pause

So again, I thank you & kudos! I don't know if they have kudos or the like here to give you. If they do, let me know & it will be in the virtual mail! :)
Have a good one!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Baidu [Spider], konimyun