Struggling with a few commands or options to do something

There’s a few questions here i cant find on the beginners guide so apologies and hopefully you can help?

first of all, the MC name? how can i create a text box where they input a variable?

2nd question

Is there a way to create a single narrative with an IF command of some description into the text.

for example:

if my text were to say;

yes my lord, i shall call you Gareth

the items in bold being different depending on what the player has chosen, is it possible to then create something along the lines of;

yes my “labelA”, i shall call you “labelB”

and of course labelA & B are named respectively elsewhere?

1 Like

You can use *input_text to generate a text box. A sample would be

What is your name?
*input_text name

For this, you’d want ${variablename} with “variablename” being replaced by the name of the variable you want to check. For example

"Hello, I am ${name}! Pleased to meet you. I use ${they} pronouns."

might display in the game

"Hello, my name is Alison and I use they pronouns.

I would recommend checking the ChoiceScript posts of Choice of Games, since they’re helpful in explaining commands. This should contain the basic intro and links to other commands should you need them.


These links also help.


I’ll add to your to-read list, though it should be already included in the post @trevers17 mentioned.

A bit detailed guide.
On your first question, the command used to do it is *input_text with the complete syntax

*input_text [varname]

For 2nd question, you want to take a look at variable declarations.

*create [varstring] "string"
*create [varboolean1] false
*create [varboolean2] true
*create [varnum] 15

Everything inside the brackets will be the name of your variables. All of these are detailed in the wiki.


thank you so much, a big help i have a 3rd question as i get into more complex code please?

if i have a selection of choices i dont want the player to keep revisting the same conversation;

for example a character Gwen;

#tell me about yourself
#how did you know my father
#what do you think of such and such
#will you ride with me to timbuktoo
#i want to talk to someone else now

so once the player has navigated option 1 "tell me about yourself, how do i remove it from the list? there must be an easier way than a whole string of possible new lists based on what the user clicks?

Something like this should work:

*label choice_01

	*hide_reuse #Tell me about yourself
		*goto choice_01
	*hide_reuse #How did you know my father
		blah blah
		*goto choice_01
	*hide_reuse #What do you think of such and such
		blah blah blah
		*goto choice_01
	*hide_reuse #Will you ride with me to Timbuktu
		blah blah blah blah
		*goto choice_01
	#I want to talk to someone else now
		blah x 5
		*goto choice_02

*label choice_02

Continue from here.

You can also use *disable_reuse the same way, only it grays out the choice instead of removing it from view.

You can find more information on this under “Hide reuse” in the wiki that @Szaal linked.


thank you so much!

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