Need Help with text box thingy

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
dandelionfluff
Newbie
Posts: 18
Joined: Thu Jun 26, 2014 10:38 am
Projects: Afternoon Of June
Contact:

Need Help with text box thingy

#1 Post by dandelionfluff » Thu Jun 26, 2014 1:52 pm

Hey so I'm new to this stuff and practically have no experience in coding and needed some help on this.

So I want to black text box thing to continue when you click and not disappear and then reappear if you know what I mean. When I added another character emotion it now does this on this one part of the game. Is there anyway I can make it back to the way it was?

User avatar
yuucie
Regular
Posts: 164
Joined: Sun Jun 22, 2014 4:04 am
Completed: NaNoReNo[2015] Those Without Names
Tumblr: an-na-ko
Location: Toronto, Canada
Contact:

Re: Need Help with text box thingy

#2 Post by yuucie » Thu Jun 26, 2014 2:33 pm

Put this line of code at the start of your game:

Code: Select all

$ _window_during_transitions = True
Be warned that if you're switching CGs back and forth and doing transitions on them (like fading, or shaking the screen) the textbox WILL reappear during then. If you don't want that to happen, add the code in front of the CG and change True to False, then after the CG is done readd the code with the True value.

Hope that helps!

User avatar
dandelionfluff
Newbie
Posts: 18
Joined: Thu Jun 26, 2014 10:38 am
Projects: Afternoon Of June
Contact:

Re: Need Help with text box thingy

#3 Post by dandelionfluff » Thu Jun 26, 2014 2:47 pm

Thanks yuucie but it seems like it still doesn't work. I tried adding the code infront of the CG but I kinda don't understand what you mean in the last part. Do you think you can give me an example? If not thanks again!

User avatar
yuucie
Regular
Posts: 164
Joined: Sun Jun 22, 2014 4:04 am
Completed: NaNoReNo[2015] Those Without Names
Tumblr: an-na-ko
Location: Toronto, Canada
Contact:

Re: Need Help with text box thingy

#4 Post by yuucie » Thu Jun 26, 2014 3:08 pm

dandelionfluff wrote:Thanks yuucie but it seems like it still doesn't work. I tried adding the code infront of the CG but I kinda don't understand what you mean in the last part. Do you think you can give me an example? If not thanks again!
Where did you add the code to? in your script.rpy, add it after:

Code: Select all

label start: 

$ _window_during_transitions = True

#rest of game goes here
As for the example, imagine that you have a character racing down the street late for school. Suddenly, she bumps into Guy A, in which you want a CG of him to pop up with a screen shake (hpunch). If you don't turn off textbox transitions, the entire CG will have a textbox on it which you may not want.

In that case, I would code it as such:

Code: Select all

label start: ### Start your game, or label as each part is called

$ _window_during_transitions = True ###Paste the code here so that your textbox won't keep flashing

### Game script here, textbox will stay during expression changes

show Girl neutral with dissolve

Girl "What time is it...?"

show Girl panic with dissolve

Girl "Oh no I'm late for school!"

scene bg outdoors
with Dissolve

"I ran down the streets, and turned a corner---"


$ _window_during_transitions = False ###Here you don't want the textbox to show when you flash a CG, so put the code here

with hpunch ### This shakes the screen

scene bg CGofGuyA  ### calls up a CG
with Dissolve

$ _window_during_transitions = True ###You want the textbox to show up again and not disappear during expression changes, so put this line of code here

Guy "Hey, watch it!"
Girl "Oops!"

### rest of game
Sorry if it wasn't clear! ### are just notes btw not actual code

User avatar
ArachneJericho
Regular
Posts: 196
Joined: Sun Jun 22, 2014 2:04 am
Projects: Kaguya Hime
Tumblr: mousedeerproductions
Location: Seattle, WA, USA
Contact:

Re: Need Help with text box thingy

#5 Post by ArachneJericho » Thu Jun 26, 2014 4:00 pm

I also found the window statement in the Ren'py documentation:

http://www.renpy.org/wiki/renpy/doc/ref ... _Statement

I tested this with the following code:

Code: Select all

    window show

    show cheshire closed eye smile 
    with Pause(1)

    hide cheshire
    with dissolve

User avatar
dandelionfluff
Newbie
Posts: 18
Joined: Thu Jun 26, 2014 10:38 am
Projects: Afternoon Of June
Contact:

Re: Need Help with text box thingy [SLOVED!]

#6 Post by dandelionfluff » Thu Jun 26, 2014 5:11 pm

Edit: Ahhh thanks so much >u< turns out I had made a second copy and edited on there but launched the other one instead! Haha I' so stupid.....

Post Reply

Who is online

Users browsing this forum: enaielei