# Input text

The ***input\_text*** command is used for displaying a text box that allows the player to type in some English alphanumeric characters. It is commonly used to allow the player to input a name for their character.\
\&#xNAN;*input\_text 命令用于显示一个文本框，允许玩家输入一些英文字母和数字字符。它通常用于让玩家为他们的角色输入一个名字。*

### Usage 用法

In order to use this command, you must [create](https://choicescriptdev.fandom.com/wiki/Create) a string variable in [startup.txt](https://choicescriptdev.fandom.com/wiki/Startup.txt) (or create a [\*temp](https://choicescriptdev.fandom.com/wiki/Temp) (temporary) variable in the [scene](https://choicescriptdev.fandom.com/wiki/Scenes) file) to be modified by the player's input.\
为了使用此命令，你必须在 startup.txt 中 \*创建一个字符串变量（或在场景文件中创建一个 \*temp（临时）变量），以便由玩家的输入进行修改。

```choicescript
*temp first_name ""

What is your name?

*input_text first_name
```

In this case, the player's input is being saved to a "string" (textual) [variable](https://choicescriptdev.fandom.com/wiki/Variable_types) called "first\_name", allowing it to be used in the story as required, such as displaying on the Stats screen, or spoken by another character when addressing the player-character.\
在这种情况下，玩家的输入被保存到一个名为 "first\_name" 的 "字符串"（文本）变量中，允许在故事中按需使用它，例如在状态屏幕上显示，或由其他角色在称呼玩家角色时说出。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://raster.gitbook.io/zh-hans_choicescript-guide/input-text.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
