> For the complete documentation index, see [llms.txt](https://espergames.gitbook.io/feel-speak/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://espergames.gitbook.io/feel-speak/scripting/triggering-dialogue.md).

# Triggering Dialogue

Triggering dialogue through code.

If you have a reference to a `DialogueGraph`, you can trigger it with the `Trigger` method. This will use the first dialogue box available in the scene.

```csharp
myDialogueGraph.Trigger();
```

You can use `FeelSpeak.TriggerDialogue` to specify the dialogue box to use by its `GameObject` name. Note that it must be in the scene.

```csharp
FeelSpeak.TriggerDialogue(myDialogueGraph, "My Dialogue Box");
```

Alternatively, you can trigger dialogue with an instance of a `DialogueBox`.

```csharp
myDialogueBox.StartDialogue(myDialogueGraph);
```
