> 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/events.md).

# Events

A list of all Feel Speak events.

Events are useful for executing custom functions at a specific time.

## Feel Speak

Events available in the `FeelSpeak` class.

| Access          | Type                        | Name                | Description                                                                                                                     |
| --------------- | --------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `public static` | `UnityEvent<Speaker>`       | `onInteracted`      | A callback for when the player has interacted with a speaker. This accepts 1 argument: the speaker interacted with (`Speaker`). |
| `public static` | `UnityEvent<DialogueGraph>` | `onDialogueStarted` | A callback for when any dialogue graph begins. This accepts 1 argument: the dialogue graph (`DialogueGraph`).                   |
| `public static` | `UnityEvent<DialogueGraph>` | `onDialogueEnded`   | A callback for when any dialogue graph ends. This accepts 1 argument: the dialogue graph (`DialogueGraph`).                     |

## Dialogue

Events available in the `Dialogue` class.

| Access          | Type                       | Name                      | Description                                                                                                                      |
| --------------- | -------------------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `public static` | `UnityEvent<DialogueNode>` | `onDialogueNodeTriggered` | A callback for when any dialogue node in any dialogue is triggered. This accepts 1 argument: the dialogue node (`DialogueNode`). |
| `public static` | `UnityEvent<ChoiceNode>`   | `onChoiceNodeTriggered`   | A callback for when any choice node in any dialogue is triggered. This accepts 1 argument: the choice node (`ChoiceNode`).       |
| `public static` | `UnityEvent<DelayNode>`    | `onDelayNodeTriggered`    | A callback for when any delay node in any dialogue is triggered. This accepts 1 argument: the delay node (`DelayNode`).          |
| `public static` | `UnityEvent<SoundNode>`    | `onSoundNodeTriggered`    | A callback for when any sound node in any dialogue is triggered. This accepts 1 argument: the sound node (`SoundNode`).          |
| `public static` | `UnityEvent<ActionNode>`   | `onActionNodeTriggered`   | A callback for when any action node in any dialogue is triggered. This accepts 1 argument: the action node (`ActionNode`).       |
| `public static` | `UnityEvent<BooleanNode>`  | `onBooleanNodeTriggered`  | A callback for when any boolean node in any dialogue is triggered. This accepts 1 argument: the boolean node (`BooleanNode`).    |
| `public static` | `UnityEvent<NestNode>`     | `onNestNodeTriggered`     | A callback for when any nest node in any dialogue is triggered. This accepts 1 argument: the nest node (`NestNode`).             |
| `public static` | `UnityEvent<Choice>`       | `onChoiceMade`            | A callback for when any choice is made. This accepts 1 argument: the choice made (`Choice`).                                     |

## Dialogue Graph

Events available in the `DialogueGraph` class.

| Access   | Type         | Name                        | Description                                                                                                                                        |
| -------- | ------------ | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `public` | `UnityEvent` | `callOnceOnDialogueStarted` | A callback for when any dialogue graph begins. All events are cleared after invoke. This accepts 1 argument: the dialogue graph (`DialogueGraph`). |
| `public` | `UnityEvent` | `callOnceOnDialogueEnded`   | A callback for when any dialogue graph ends. All events are cleared after invoke. This accepts 1 argument: the dialogue graph (`DialogueGraph`).   |

## Speaker

Events available in the `Speaker` class.

| Access   | Type         | Name           | Description                                                      |
| -------- | ------------ | -------------- | ---------------------------------------------------------------- |
| `public` | `UnityEvent` | `onInteracted` | A callback for when the player has interacted with this speaker. |

## Choices List

Events available in the `ChoicesList` class.

| Access   | Type         | Name      | Description                                     |
| -------- | ------------ | --------- | ----------------------------------------------- |
| `public` | `UnityEvent` | `onOpen`  | A callback for when the choices list is opened. |
| `public` | `UnityEvent` | `onClose` | A callback for when the choices list is closed. |

## Choices Timer

Events available in the `ChoiceTimer` class.

| Access   | Type         | Name         | Description                                         |
| -------- | ------------ | ------------ | --------------------------------------------------- |
| `public` | `UnityEvent` | `onStart`    | A callback for when the choice timer has started.   |
| `public` | `UnityEvent` | `onComplete` | A callback for when the choice timer has completed. |

## Dialogue Box

Events available in the `DialogueBox` class.

| Access   | Type         | Name      | Description                                     |
| -------- | ------------ | --------- | ----------------------------------------------- |
| `public` | `UnityEvent` | `onOpen`  | A callback for when the dialogue box is opened. |
| `public` | `UnityEvent` | `onClose` | A callback for when the dialogue box is closed. |

## Emotion Bubble

Events available in the `EmotionBubble` class.

| Access          | Type                        | Name      | Description                                                                                                      |
| --------------- | --------------------------- | --------- | ---------------------------------------------------------------------------------------------------------------- |
| `public static` | `UnityEvent<EmotionBubble>` | `onOpen`  | A callback for when any emotion bubble is opened. This accepts 1 argument: the emotion bubble (`EmotionBubble`). |
| `public static` | `UnityEvent<EmotionBubble>` | `onClose` | A callback for when any emotion bubble is closed. This accepts 1 argument: the emotion bubble (`EmotionBubble`). |
