Naming Two Characters Manually

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
TheFandomPerson
Newbie
Posts: 4
Joined: Sat Jul 10, 2021 1:21 am
Contact:

Naming Two Characters Manually

#1 Post by TheFandomPerson »

Let's say I name the Player Character. If the Player Character has, say, an NPC friend in the game, is it possible to name the NPC friend as well? Like, manually input my own name for the NPC?
"I would shun the light, share in evening's cool and quiet
Who would trade that hum of night?
For sunlight, sunlight, sunlight
But whose heart would not take flight?
Betray the moon as acolyte
On first and fierce affirming sight
Of sunlight, sunlight, sunlight..."

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2400
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Naming Two Characters Manually

#2 Post by Ocelot »

You do it exactly like you do for naming PC. There is no functional difference between naming one character or another:

Code: Select all

default PC_name = 'Protagonist'
default NPC_name = 'Friend'
define PC = Character([PC_name])
define NPC= Character([NPC_name])
# . . .
$ PC_name = renpy.input('What is your name?')
$ NPC_name = renpy.input('What is the name of your best friend?')
PC "Hi, [NPC_name]!"
NPC "Hi, [PC_name]!"
< < insert Rick Cook quote here > >

TheFandomPerson
Newbie
Posts: 4
Joined: Sat Jul 10, 2021 1:21 am
Contact:

Re: Naming Two Characters Manually

#3 Post by TheFandomPerson »

Ocelot wrote: Sat Jul 10, 2021 8:18 am You do it exactly like you do for naming PC. There is no functional difference between naming one character or another:

Code: Select all

default PC_name = 'Protagonist'
default NPC_name = 'Friend'
define PC = Character([PC_name])
define NPC= Character([NPC_name])
# . . .
$ PC_name = renpy.input('What is your name?')
$ NPC_name = renpy.input('What is the name of your best friend?')
PC "Hi, [NPC_name]!"
NPC "Hi, [PC_name]!"
Thanks, it worked!
"I would shun the light, share in evening's cool and quiet
Who would trade that hum of night?
For sunlight, sunlight, sunlight
But whose heart would not take flight?
Betray the moon as acolyte
On first and fierce affirming sight
Of sunlight, sunlight, sunlight..."

Post Reply

Who is online

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