> For the complete documentation index, see [llms.txt](https://docs.sparkframework.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sparkframework.dev/documentation/developer-guide/core-systems/triggers-system/trigger-types.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.sparkframework.dev/documentation/developer-guide/core-systems/triggers-system/trigger-types.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
