How do I change textboxes on the fly?

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
Charmareian
Newbie
Posts: 2
Joined: Fri Aug 28, 2020 5:57 pm
Contact:

How do I change textboxes on the fly?

#1 Post by Charmareian » Fri Aug 28, 2020 6:05 pm

Hello everyone, this is my first post on the forums.

I have my normal textbox "textbox.png"

I want to change to another character's perspective at a point in my game.

When I do that, I want to replace my blue textbox with a pink one.

I know you can do character specific ones. But I don't want the textbox to be pink only when that character talks.

When I do this perspective change, I want both the narrator and all other characters to use the new textbox until I call the original one back.

Is this possible?



EDIT: I figured it out. I just copy and pasted the window style code in screens.rpy and made an alternate version.

User avatar
namastaii
Eileen-Class Veteran
Posts: 1348
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: How do I change textboxes on the fly?

#2 Post by namastaii » Sun Aug 30, 2020 1:06 am

You could probably include a variable name in the file name so your textbox is "textbox_[variablenamehere].png" and you change $ variablenamehere = "new perspective" etc and it should change it that way? as another alternative

Post Reply

Who is online

Users browsing this forum: No registered users