Several textboxes NOT simultaneously

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
Nekto_K
Newbie
Posts: 3
Joined: Fri Dec 29, 2017 12:29 am
Contact:

Several textboxes NOT simultaneously

#1 Post by Nekto_K » Tue Dec 17, 2019 3:49 am

Hello. I don't know how to realize several textboxes in different bubbles (like in a comics/manga) that are showing one by one (on click). Example:

1) show phraseX of Character1
2) show phraseY of Character2 (phraseX of Character1 is still showing)
3) replace phraseX of Character1 with phraseZ (phraseY of Character2 is still showing)
4) hide phraseY of Character2 (phraseZ of Character1 is still showing)
and so on.

I was thinking about (multiple=х), but all of them are showing simultaneously, and tags like {w} doesn't work with it.
I was thinking about ParameterizedText for each phrase, but this is a little troubled when there is a hundreds phrases with different styles.

philat
Eileen-Class Veteran
Posts: 1752
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Several textboxes NOT simultaneously

#2 Post by philat » Tue Dec 17, 2019 4:38 am

If you have infinite possible styles/placements, then there's really no way around it. Either a screen where you feed in styles manually (you would have to show the screens manually rather than using say statements, but you can show multiple iterations of a screen or have multiple similar screens (say1, say2, and so forth) to show simulataneously) or ParameterizedText.

User avatar
Ibitz
Regular
Posts: 56
Joined: Thu Jul 27, 2017 4:47 pm
Projects: Magical Disarray (WIP)
Organization: Ibitz Visual Novels
Deviantart: http://ibitz.deviant
itch: ibitz
Contact:

Re: Several textboxes NOT simultaneously

#3 Post by Ibitz » Wed Dec 18, 2019 9:11 pm

You can always design your dialogue as text bubbles or boxes in the same way as sprites and then show them that way wherever you want. You can animate them and simulate text messages or whatever you need.
Image

Ibitz is a self-taught coder/artist who works alone on their games. All games I create are freeware. If you need any help with coding or creating your game, just let me know. I'd be more than happy to help.

Nekto_K
Newbie
Posts: 3
Joined: Fri Dec 29, 2017 12:29 am
Contact:

Re: Several textboxes NOT simultaneously

#4 Post by Nekto_K » Thu Dec 19, 2019 12:41 am

Ibitz wrote:
Wed Dec 18, 2019 9:11 pm
You can always design your dialogue as text bubbles or boxes in the same way as sprites and then show them that way wherever you want. You can animate them and simulate text messages or whatever you need.
Can you bring an example of code for this?

User avatar
Andredron
Veteran
Posts: 418
Joined: Thu Dec 28, 2017 2:37 pm
Location: Russia
Contact:

Re: Several textboxes NOT simultaneously

#5 Post by Andredron » Thu Dec 19, 2019 3:34 am

Code: Select all

define sh = Character('Shino', 
    color="9966cc", 
    window_background = Frame("textbox3.png", 0, 0), #Your custom textbox.
    window_left_margin = 320,
    window_right_margin = 10,
    window_top_margin = 70,
    window_bottom_margin = 500,
    window_left_padding = 60,
    window_right_padding = 10,
    window_top_padding = 70,
    window_bottom_padding = 75,
    ctc="ctc_blink")


label start:
    sh "text" 

viewtopic.php?f=51&t=17232#p225925

Else:

viewtopic.php?f=51&t=50153
I know, I'm writing terribly in English.

I'm writing a Renpy textbook (in Russian). https://yadi.sk/d/ZX_DonP63USRru Update 22.06.18

Honest Critique

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]