Trigger action¶
The Trigger action component (Component) can be used to activate or deactivate gameplay mechanics, including cutscenes, jumpscares, puzzles, etc. When the trigger is activated, the corresponding action is executed.
Property | Description |
---|---|
DefaultState | If toggled on, the trigger action component is activated by default. |
TriggerOnce | If toggled on, the trigger and associated actions will work once only during the game. |
Entity | An object that the trigger affects or interacts with, such as a character, object, sound clip, animation, or other game element. |
Trigger | Set the condition under which actions are triggered on specific entities in your game. Some triggers are only available when certain components are attached to an entity. However, the following six universal triggers are always available:
|
TriggerEntity | An object that is used to activate a trigger. When a trigger entity enters the trigger box of a trigger, the trigger is activated and the associated event or action is triggered. This option is only visible when the Trigger is set to EnterTriggerZone(SceneObject) or ExitTriggerZone(SceneObject). |
ActionEntity | An object that performs a specific action or set of actions when a trigger is activated, such as spawning enemies, playing sounds, or triggering events. |
Action | Controls the action to be executed on the ActionEntity when triggered. There are 17 universal actions:
|
Audio | The audio clip that plays when triggered. This option is visible only when Action is set to PlayAudio. |
Target Audio Name | Selects the audio to be controlled on the ActionEntity. This option is visible only when Action is set to AdjustAudio. |
Blend Time | The time in seconds that it takes for the audio to transition from one state to another. This option is visible only when Action is set to AdjustAduio. Ranges from 0 to 100. Default: 0. |
Stop Audio | Stops playing the audio clip. This option is visible only when Action is set to AdjustAduio. |
Volume | Determines how loud or soft the audio will be when the trigger is activated. This option is visible only when Action is set to AdjustAduio. Ranges from 0-150%. Default: 100%. |
LockCamera | If enabled, the player camera is locked when the trigger is activated. This option is visible only when Action is set to DisablePlayerMovement. |
TargetTransform | Controls a point in the scene that the player is teleported to when the trigger is activated. This option is visible only when Action is set to TransferPlayer. |
Delay | The amount of time that should elapse before an action is triggered. Ranges from 0 to 30. Default: 0. |
Related components
The Component is usually applied in smart assets, including:
- Puzzles: Locked Door and Key, Book and Bookcase Puzzle
- Lighting Props: Lighter and Candle
- NPC: Patrol Monster
- Jumpscare
- Cutscenes
- Narrator: Voice Over
- Items: Collectable Item and Inspectable Item
The Component can also be used with other horror components to achieve similar effects as smart assets, for example, used with Narrator to set up a voice-over.