Can you set a variable yourself, without asking for input? Such as, [NAME] =

Let’s say I want to change the name after the user already entered their name. But I don’t want to ask for user input. I just want to change it myself. Something like [NAME] = “Some random name”… I don’t know? I haven’t been able to find the code on how to do this… is this even possible?

1 Like

Can you explain more?

After the reader chooses their name, let’s say I want to change it.
input What is the main character’s name? | What is the main character’s name? | Done (NAME)

So then, let’s say I want to change the name manually, without asking the reader for input.
[NAME] = “Girl”
Or something? I don’t know the proper code for this…

1 Like

Um, So you don’t want the readers to name their character??

I think I figured out one way to do it. I just named the choice NAME, and then one of the choices is just the character’s default name. Basically, I wanted the reader to either pick their own name, or use the default name. But I don’t want to make the reader type in the name if they don’t want to change the name. This is what I did so far (if anyone finds this helpful):
label pickname
NARRATOR
Her default name is Ellie, but you can change it if you want. What should her name be?
choice (NAME)
“I’d like to change her name.” {
input What is the main character’s name? | What is the main character’s name? | Done (NAME)
NARRATOR
You want to name her [NAME], is that correct?
choice
“Yes, I want to name her [NAME].” {
NARRATOR
Great, she’s now named [NAME].
}
“No, wait, let me change it!” {
goto pickname
}
}
“Ellie” {
NARRATOR
Okay, her name is [NAME].
choice
“Yes, continue.” {
continue
}
“No, wait, I want to change her name!” {
goto pickname
}
}

I don’t know if there’s any other way to do it.

1 Like

I haven’t seen anyone do it where they default name. I tried doing some research but couldn’t find any way to do it other than creating two separate characters: one named NAME and one named Ellie.

I think the best you can do is go…


label pickname

NARRATOR
Her default name is | bold |Ellie| reset , no-space |, but you can change it if you want. What should her name be?

input What is the MC’s name? (Default Ellie.) | What is the main character’s name? | Done (NAME)

NARRATOR
You want to name her [NAME], is that correct?

choice
“Yes I want to name her [NAME].” {
NARRATOR
Great, she’s now named [NAME].
} “No, wait! Let me change it.” {
goto pickname
}


You can just do this:

NARR
Do you want to pick her name?

choice
“Yes, change it” {

input What’s her name? | What’s her name? | Done (ELLIE)

} No, keep her name as Ellie" {

}

You can keep the display name as ELLIE, and if they choose “no” the name will stay as ELLIE. If they change it, “ELLIE” will change to whatever name they chose.

2 Likes

Thank you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.