# Trigger Types

All trigger types provided by the Spark Triggers core system. These are general-purpose triggers available regardless of which plugins are installed.

***

## AnimatorTriggerType

Sets an Animator parameter or triggers an animation state when activated.

| Property            | Type                    | Description                                       |
| ------------------- | ----------------------- | ------------------------------------------------- |
| `AnimatorParameter` | `string`                | The Animator parameter name to set                |
| `ParameterType`     | `AnimatorParameterType` | The type of parameter (Bool, Float, Int, Trigger) |
| `Value`             | `string`                | The value to set the parameter to                 |

***

## ComponentMethodTriggerType

Invokes a method on a specified component when triggered. Useful for calling custom MonoBehaviour methods from the trigger system.

| Property          | Type        | Description                           |
| ----------------- | ----------- | ------------------------------------- |
| `TargetComponent` | `Component` | The component to invoke the method on |
| `MethodName`      | `string`    | The name of the method to call        |

***

## DestroySelfTriggerType

Destroys the GameObject this trigger is attached to when activated.

***

## InstantiateGameObjectTriggerType

Instantiates a prefab at a specified location when triggered.

| Property     | Type         | Description                                           |
| ------------ | ------------ | ----------------------------------------------------- |
| `Prefab`     | `GameObject` | The prefab to instantiate                             |
| `SpawnPoint` | `Transform`  | The transform to use for position and rotation        |
| `Parent`     | `Transform`  | Optional parent transform for the instantiated object |

***

## ToggleUIPanelTriggerType

Toggles the visibility of a UI panel when triggered.

| Property    | Type     | Description                        |
| ----------- | -------- | ---------------------------------- |
| `PanelName` | `string` | The name of the UI panel to toggle |

***

## ExecuteTriggerCommand

A command that executes a trigger group. While technically a command, it bridges the command and trigger systems.

| Property       | Type            | Description                                  |
| -------------- | --------------- | -------------------------------------------- |
| `TriggerGroup` | `TriggerGroup`  | The trigger group to execute                 |
| `Entity`       | `NetworkEntity` | The entity context for the trigger execution |

```csharp
var command = new ExecuteTriggerCommand
{
    TriggerGroup = myTriggerGroup,
    Entity = playerEntity
};
Spark.Network.ExecuteCommand(command);
```


---

# 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://docs.sparkframework.dev/documentation/developer-guide/core-systems/triggers-system/trigger-types.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.
