Trigger Event
#Content editor
Last updated
#Content editor
Last updated
1οΌSelect a single layer or a single scene.
2οΌClick the "Add Event" button on the right side to open the trigger event type options tab.
3οΌBased on the product gameplay and asset requirements, select the appropriate trigger event.
4οΌAfter adding the trigger event, you can add the desired response events below it.
Note: Typically, the object for adding a trigger event depends on where we want players to interact.
For example, if we want a specific effect to occur when players click on an item, we can select the layer of that item and add the "click" trigger event with the corresponding response event. If we want players to be able to click anywhere on the screen, we can directly select the scene and add the "click" trigger event with the corresponding response event.
Clicking the icon button allows you to replace an already added trigger event (without changing the response events).
1οΌClicking the icon button enables you to copy the corresponding trigger event along with its response events.
2οΌAfter copying the event, you can select the layer or scene where you want to paste the event and quickly implement the same event.
Clicking the icon button allows you to delete the corresponding trigger event along with its response events.
Trigger events include six types: [Click], [Swipe], [Drag], [Delay], [Logic], and [Media playback].
Image | Event Properties | Trigger Event | Triggering Methods Included |
---|---|---|---|
General events | Click | Click Long press 3s Press Lift up Double click | |
General events | Swipe | Swipe up Swipe down Swipe left Sipe right Swipe arbitrarily | |
Layer events (General layers) | Drag | Drag Drag and drop to the specified location | |
Layer events (Video/Audio layers) | Media playback | Starting time Ending time | |
Scene events | Delay | Timing trigger | |
Scene events(Global Variables) | Logic | Condition |
1οΌ"Click" includes: Click, Long press 3s, Press, Lift up, Double click.
2οΌCorresponding triggering moments are:
Click: Triggered when the user presses and then releases the screen.
Long press 3s: Triggered when the user holds down the screen for 3 seconds and then releases.
Press: Triggered as soon as the user presses down on the screen, regardless of whether they lift their finger.
Lift up: Triggered when the user lifts their finger from the screen, regardless of how long it was pressed.
Double click: Triggered when the user quickly taps the screen twice.
1οΌ"Swipe" includes: Swipe up, Swipe down, Swipe left, Sipe right, Swipe arbitrarily.
2οΌCorresponding triggering moments are:
Swipe up: Triggered when the user swipes upwards on the screen and then releases.
Swipe down: Triggered when the user swipes downwards on the screen and then releases.
Swipe left: Triggered when the user swipes leftwards on the screen and then releases.
Swipe right: Triggered when the user swipes rightwards on the screen and then releases.
Swipe arbitrarily: Triggered when the user swipes in any direction on the screen and then releases.
Note: With the "Swipe" event category, the layers do not follow the movement of the player's finger.
1οΌ"Drag" includes: Drag, Drag and drop to the specified location.
2οΌCorresponding triggering moments are:
Drag: Triggered when dragging a layer without releasing the touch.
Drag and drop to the specified location: Triggered if the dragged layer is released within a specified area. If the layer is released outside the specified area, it will return to its original position without triggering the event.
3οΌAfter selecting the "Drag" event, you can choose the "Drag Direction": Any Direction, Horizontal Direction, Vertical Direction.
4οΌAfter selecting the "Drag and drop to the specified location" event, you need to "Edit the drag area": Add the designated area, adjust the position and size of the area, and select the drag range.
Similarly, you can choose the "Drag Direction": Any Direction, Horizontal Direction, Vertical Direction.
Note: The "Drag" event is only applicable to regular layers, excluding video and audio layers.
1οΌ"Media Playback" includes: Starting time, Ending time.
2οΌCorresponding triggering moments are:
Starting time: Triggered when the selected video/audio starts playing.
Ending time: Triggered when the selected video/audio finishes playing.
Note: The "Media Playback" event is only applicable to video and audio layers.
1οΌ"Delay" includes: Timing trigger. ("Timing trigger" can only be added to scenes.)
2οΌThe corresponding triggering moment is based on the set "Delay time" for timer-triggered events (if the delay time is set to 0s, it means the event will be triggered automatically when entering the scene).
NOTEοΌ
To add multiple timers to a scene: Simply add a "Execution Delay" response event under an existing Timing trigger event. Note that the execution delay duration is cumulative; the delay duration of subsequent events will inherit the total duration of the preceding delays (e.g., if a special effect plays 0.5s after entering, and then it waits 1s to redirect to app store, it means the app store will be redirected 1.5s after entering).
To add a timer to a layer: Add the "Execute Delay" response event under the layer event (the logic for adding multiple timers is the same as above).
1οΌ"Logic" includes: Condition.
2οΌThe corresponding triggering moment is when a variable satisfies the specified condition.
3οΌAfter adding "Condition," click "Add conditions" in the popup window, then select global variables, mathematical operations, and values in order.
4οΌIt supports checking the option "Valid only once."
Note: You can use this trigger event only if Global Variables have been added to the current project (refer to the feature introduction document for quicker understanding of this trigger event).