# Give the player a choice

A **choice** is a line the player picks instead of reads. You'll let the player answer the guard in three ways, give each answer its own reply, and bring every branch back together at the end.

## Before you begin

Complete [Start a conversation near an NPC](talk-to-an-npc.md). This guide edits the `Gate Conversation` Script on the guard.

## Write the choices

Start each choice with an asterisk (`*`). Open `Gate Conversation` and replace its text with:

```dialogue
Guard: Halt! State your business, traveler.

* I'm a merchant. I've come for the market.
* I'm here to see the village elder.
* Never mind. I'll be on my way.
```

When the Script reaches a run of `*` lines, it stops and shows them together as one **choice group**. The conversation waits until the player picks one, and the blank line before the group only makes the Script easier to read.

## Answer each choice

Lines indented two spaces under a choice belong to it, and they play only when the player picks that choice:

```dialogue
Guard: Halt! State your business, traveler.

* I'm a merchant. I've come for the market.
  Guard: Then you'll want the east road. The market opens at dawn.

* I'm here to see the village elder.
  Guard: The elder? She doesn't see strangers.
  Guard: But you look harmless enough.

* Never mind. I'll be on my way.
  Guard: Safe travels. Keep to the road after dark.
```

A branch can hold any number of lines. When it finishes, the Script skips the other choices and continues after the group.

!!! tip "Press Tab to indent"
    In the Script's text area, `Tab` inserts two spaces. Indentation is how Dialogue knows which lines belong to which choice, so a line with one space too few or too many can end up in the wrong branch, or stop the Script from loading.

## Bring the branches back together

A line with no indentation after the group plays no matter which choice the player picked. Add a closing line at the end of the Script:

```dialogue hl_lines="13"
Guard: Halt! State your business, traveler.

* I'm a merchant. I've come for the market.
  Guard: Then you'll want the east road. The market opens at dawn.

* I'm here to see the village elder.
  Guard: The elder? She doesn't see strangers.
  Guard: But you look harmless enough.

* Never mind. I'll be on my way.
  Guard: Safe travels. Keep to the road after dark.

Guard: Move along, then.
```

Each branch now ends with *Move along, then.* This is the usual shape of a conversation: it branches for a moment, then returns to the main thread.

## End the conversation early

Sometimes a choice should end the conversation on the spot. `@exit` stops the Script immediately and skips every remaining line, including lines after the group. Add a fourth choice with an attitude:

```dialogue hl_lines="13-15"
Guard: Halt! State your business, traveler.

* I'm a merchant. I've come for the market.
  Guard: Then you'll want the east road. The market opens at dawn.

* I'm here to see the village elder.
  Guard: The elder? She doesn't see strangers.
  Guard: But you look harmless enough.

* Never mind. I'll be on my way.
  Guard: Safe travels. Keep to the road after dark.

* Player: Out of my way, or I'll open that gate myself.
  Guard.angry: Try it. I've been waiting all week for some excitement.
  @exit

Guard: Move along, then.
```

The guard's threat is the last thing the player hears on that branch, because `@exit` stops the Script before *Move along, then.*

This choice also starts with `Player:`. A choice accepts the same Actor and Expression syntax as a text line, so the interface can show who is about to speak and how.

## Nest a follow-up question

A branch can contain its own choice group. Indent the group under the choice it follows, and indent its answers one level further:

```dialogue
* I'm here to see the village elder.
  Guard: The elder? She doesn't see strangers.
  Guard: What do you want with her?

  * I bring news from the capital.
    Guard: News, is it? Fine. Second house past the well.

  * That's between her and me.
    Guard: Then it can stay between you and the gate.
```

When the inner branch finishes, the Script returns to the outer level. It continues after the outer group, at *Move along, then.*

## Verify the result

Enter Play mode, walk up to the guard, and try each path. The sample Skin lets you click a choice or press its number key.

- The merchant, elder, and leave choices each play their reply, then *Move along, then.*
- The elder choice asks a follow-up before rejoining.
- The threat ends the conversation after the guard's angry reply.

## Where to go next

- **[Let the player ask questions](question-hub.md)** — return to the same choices until the player chooses to leave.
- **[Language syntax](../../syntax.md#choices)** — read the complete rules for choices and indentation.
- **[Scripts](../../scripts.md#choice-and-text-options)** — shuffle choices, hide unavailable ones, or pick a lone choice automatically.
