How can I add something with the imput?

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
Nanahs
Veteran
Posts: 297
Joined: Wed Aug 22, 2018 5:50 pm
Contact:

How can I add something with the imput?

#1 Post by Nanahs » Sun Feb 17, 2019 11:31 am

When I let the playrt type like this:

Code: Select all

    $ answer1 = renpy.input("How are you?")
I wanted the character's (that is also a default/imput) "[name]" to appear in front of the anwers.

I mean, if the person answers "I'm fine, thanks."

I wanted [answer1] to appear as (let's just say the person chose Jhon as their name):

"Jhon: I'm fine, thanks."

Is there a way I can add the "[name]:" directly here?

Code: Select all

    $ answer1 = renpy.input("How are you?")
Thanks.

User avatar
Scribbles
Miko-Class Veteran
Posts: 635
Joined: Wed Sep 21, 2016 4:15 pm
Completed: Pinewood Island, As We Know It
Projects: In Blood
Organization: Jaime Scribbles Games
Deviantart: breakfastdoodles
itch: scribbles
Location: Ohio
Contact:

Re: How can I add something with the imput?

#2 Post by Scribbles » Sun Feb 17, 2019 3:37 pm

Code: Select all

define char_name = Character("[name]")
where char_name is the name you put in front of the text

Code: Select all

 
char_name  "I am fine"
Is that what you were looking for?
Image - Image -Image

User avatar
Nanahs
Veteran
Posts: 297
Joined: Wed Aug 22, 2018 5:50 pm
Contact:

Re: How can I add something with the imput?

#3 Post by Nanahs » Thu Feb 21, 2019 7:58 pm

Scribbles wrote:
Sun Feb 17, 2019 3:37 pm

Code: Select all

define char_name = Character("[name]")
where char_name is the name you put in front of the text

Code: Select all

 
char_name  "I am fine"
Is that what you were looking for?
I'll try it. Thank you!

Post Reply

Who is online

Users browsing this forum: Ace94, Google [Bot], Majestic-12 [Bot]