Event
An event is a set of actions Amplitude has to execute once it has been triggered at runtime, during your game. Event assets are described with the following properties:
Info
The flatbuffers schema of this file can be found here.
id¶
uint64 required
A unique value across event assets that represents the ID of this object. It may be reused later to get the instance of this event from the engine at runtime.
name¶
string required
A unique value across event assets that represents the name of this object. It may be reused later to get the instance of this event from the engine at runtime.
run_mode¶
EventActionRunningMode default: Parallel
Specifies how the actions of this event should be scheduled when the event is triggered. The possible values of this enumeration are:
| ID | Name | Description |
|---|---|---|
| 0 | Parallel | All actions are executed at the same time, regardless of the order they are defined in the actions array. This is the default behavior. |
| 1 | Sequential | Actions are executed one after another, in the order they are defined in the actions array. Each action waits for the previous one to complete before starting (when applicable). |
Info
Only the Wait action has a meaningful "completion" point under Sequential. Other actions (e.g., Play, Pause) dispatch their work to the engine and complete immediately, so the next action in the sequence runs right after.
actions¶
EventActionDefinition[] required
An array of actions to execute. The order of execution depends on the run_mode property. Each object of this array is defined by the given properties:
type¶
EventActionType default: None
This specifies the type of action to execute. The possible values of this enumeration are:
| ID | Description |
|---|---|
| None | noop action. |
| Wait | Waits for the given amount of time. The targets property should contain a single value representing the number of milliseconds to wait. |
| Play | Plays the sound objects with the identifiers given in the targets property. |
| Pause | Pauses the sound objects with the identifiers given in the targets property. |
| Resume | Resumes the sound objects with the identifiers given in the targets property. |
| Stop | Stops the sound objects with the identifiers given in the targets property. |
| Seek | Seeks the sound objects with the identifiers given in the targets property, to the given position. |
| MuteBus | Mutes the buses with the identifiers given in the targets property. |
| UnmuteBus | Unmutes the buses with the identifiers given in the targets property. |
Warning
The Seek action is not yet supported. Creating a Seek action will result in a noop.
active¶
bool default: true
Defines whether the action is active or not. An inactive action will not be executed when the parent event will be triggered at runtime.
targets¶
uint64[] required
A list of object identifiers on which execute the given action. For Play, Pause, Resume, Stop and Seek actions, this array should contain Sound Objects identifiers. For MuteBus and UnmuteBus actions, this array should contain Buses identifiers.
scope¶
Scope default: Entity
Set the Scope in which this action will be executed. If this value is set to Entity, the event should be triggered with a valid entity at runtime.