Data\Actor\Events
Events are used to play animations on units in response to data events (like playing an attack animation when a unit attacks with a weapon or playing a death animation when a unit dies.)
Each event can have multiple conditions and multiple actions.
Similiar to triggers, actor events have 3 components.
- Event: The event that triggers the actor event.
- Condition: Optional conditions to evaluate. All conditions must succeed for the action to be executed.
- Action: The actions to execute in response to the event.
Events
An actor event can be used multiple times on an actor. When the same event is used more than once, the events are checked in order from top to bottom.
Unit Spawn
Triggers when the linked unit is spawned.
Unit Morph
Triggers when a unit undergoes a Morph effect.
If Unit Type is not set, any morph on a unit will trigger this event.
Unit Type
Unit Remove
Triggers when a unit is removed.
Unit Stand
Triggers when a unit leaves its movement state (ie, when it begins standing).
Unit Walk
Triggers when a unit enters its movement state (ie, when it begins walking).
Unit Death
Triggers when a unit dies.
Unit Damaged
Triggers when a unit gets damaged.
Unit Weapon Start
Triggers when a unit begins attacking with a weapon.
If Weapon is not set, any weapon attack will trigger this event. If this event triggers a Play Animation action, the animation duration will be calculated from the weapon preswing + backswing, multiplied by any attack speed modifiers.
Weapon
Unit Weapon Stop
Triggers when a unit stops attacking with a weapon.
Weapon
Unit Ability Start
Triggers when a unit starts casting an ability.
If this event triggers a Play Animation action, the animation duration will be calculated from the ability prep time + finish time.
Ability
If left blank, any ability will trigger the event.
Unit Ability Stop
Triggers when a unit stops casting an ability.
Ability
If left blank, any ability will trigger the event.
Unit Ability Targeting On
Triggers when an ability enters targeting mode.
Ability
If left blank, any ability will trigger the event.
Unit Ability Targeting Off
Triggers when an ability leaves targeting mode.
Ability
If left blank, any ability will trigger the event.
Unit Children Selection On
Triggers when the children of this unit are selected.
Unit Type
Unit Children Selection Off
Triggers when the children of this unit are deselected.
Unit Type
Unit Move Command Received
Triggers when a unit receives a movement command.
Unit Attack Command Received
Triggers when a unit receives an attack command.
Unit Weapon Damage Point
Triggers when a unit executes an attack with a weapon (occurs after preswing).
Weapon
Pre Ability Targeted On
Triggers when a unit becomes highlighted by ability in targeting mode.
Ability
If left blank, any ability will trigger the event.
Pre Ability Targeted Off
Triggers when a unit is unhighlighted by ability in targeting mode.
Ability
If left blank, any ability will trigger the event.
Pre Ability Cast Targeted
Sent to the target unit's actor scope when a targeting ability is cast on the unit.
Ability
If left blank, any ability will trigger the event.
Selection On
Triggers when a unit is selected or on mouse hover.
Selection Type
- SELECTION: Use selection for on select.
- PRE_SELECTION: Use preselection for on hover.
Selection Off
Triggers when a unit is deselected or on mouse hover off.
Selection Type
- SELECTION: Use selection for on select.
- PRE_SELECTION: Use preselection for on hover.
Behavior On
Triggers when a unit gains a behavior.
If Behavior is not set, any behavior will trigger this event.
Behavior
The behavior that triggers this event.
Behavior Off
Triggers when a unit loses a behavior (including if the behavior becomes disabled).
If Behavior is not set, any behavior will trigger this event.
Behavior
The behavior that triggers this event.
Behavior Stack Increase
Triggers when a unit gains behavior stack(s).
Behavior
The behavior that triggers this event.
Behavior Stack Decrease
Triggers when a unit loses behavior stack(s).
Behavior
The behavior that triggers this event.
Persistent Effect On
Triggers when a persistent effect is created.
The persistent effect must have a period count of at least 1. If Effect is not set, any persistent effect will trigger this effect.
Effect
The persistent effect that triggers this event.
Persistent Effect Off
Triggers when a persistent effect is destroyed.
Effect
The persistent effect that triggers this event.
Actor Create
Triggers when the actor is created.
Actor Destroy
Triggers when the actor is destroyed.
Actor Orphan
Triggers when the actor becomes orphaned. Actors become orphaned when their host actor is destroyed (an actor's host is typically the actor that created it).
Animation Finish
Triggers when an animation on the actor finishes.
Clip
The animation that should trigger this event.
On Timer
Triggers when a timer expires.
Name
The name of the timer that triggers this event.
On Custom Event
Triggers when a custom event is recieved.
Identifier
The name of the custom event that triggers this event.
Beam Lost Target
Triggers when the target of beam model actor is destroyed.
Beam Lost Launch
Triggers when the launch of beam model actor is destroyed.
Conditions
Conditions to be met for the actions to be executed. If any of the condition evaulates to 0, the actions will not be executed. Note that the condition will be evaulated in the context of an existing actor. If this event is used to create a new actor (e.g., create a actor when a certain behavior is turned on), the evaulation context will be the root of the actor scope (e.g., the unit actor). If no actor can be found, the conditions are assumed to be met.
In most cases, you want to use the Compare condition.
Actions
Actions to run in response to an event, after conditions are checked. Actions that target other actors can only be sent to other actors of the same scope.
Play Animation
Plays an animation on the actor.
GPU model animations can be previewed in the Asset Previewer.
Clip Id
Which animation to play. The default animation is "Attack".
Use Real Timer
Stop Animation
Stops playing an animation that was initiated by a Play Animation action.
Clip Id
Which animation to stop playing. The default animation is "Attack".
Create
Create a new actor in the scope of this actor.
The new actor should be a Model Actor.
Actor
The type of new actor to create.
Host Site
If set, this value will overwrite the Host Site field of the created actor.
Host Site Operations
If set, this value will overwrite the Host Site Operations field of the created actor.
Aliases
Used to assign an Alias to the new actor.
An actor can be referenced by its name or any of its aliases.
Detached
When checked, prevents the created actor from following its source actor.
Destroy
Destroys an actor.
If Actor is not set, the actor will destroy itself.
Actor
Look for an actor with this name within the scope to destroy.
Log
Prints a log message in the Play Settings Log.
Type
Determines if the message is displayed as a debug, warning, or error message.
- DEBUG: The log message will use black text.
- WARNING: The log message will use yellow text.
- ERROR: The log message will use red text.
Message
The message to be printed.
Create Timer
Creates a custom timer on the actor that triggers a On Timer event.
Name
Name of the timer. This name is only defined in the scope of the current actor. You can use the same timer name in different actors and they won't interfere.
Duration
How soon the timer should expire (in seconds). After the timer is expired, an OnTimer event will be sent to the actor.
Note that actors are not bound by the 1/16 second game update, so any duration used here doesn't need to be a multiple of 0.0625.
Repeat
By default a timer will be removed after it's expired. Set this flag to true will keep the timer and an OnTimer event will be fired every time when the time specified in "duration" has passed.
Remove Timer
Removes a timer without trigger an On Timer event.
Name
Name of the timer to remove. Note that a timer event may still be fired after removing the timer.
Set Site Operations
Sets the Site Operations of the actor. Note that unless Append is enabled, the new site operations will overwrite any existing site operations on the actor. Duration can be used to create simple animations.
Site Operations
The site operations to apply to the actor.
Duration
If set, the site operations will be applied over this duration. Does not work for all types of site operations.
Append
If set, the new site operations will be added to the existing site operations on the actor instead of overwriting them. Does not work for all type sof site operations.
Ease
EnumType: ActorAction.EaseType
The easing function to use if the site operations are applied over a duration.
Ease Intensity
Optional parameter for some easing functions (elastic, back, and bounce) to adjust the amplitude or overshoot amount.
Create Aliases
Add aliases for an actor.
Applies an alias to the actor. If Actor is not set, the aliases will be applied to this actor.
Actor
The actor to apply the aliases to. Accepts an actor name or alias.
Aliases
The aliases to apply.
Set Variable
Sets a variable on the actor that can be checked by Conditions.
Name
The name of the variable.
Value Expression
The value of the variable. Most commonly set to a constant, random integer, or using add to increment the variable by a constant.
Send Custom Event
Sends a custom event that triggers an On Custom Event event. If Actor is not set, then the actor will send the custom event to itself. If the actor scope contains multiple actors with the targeted name or alias, only the first actor will recieve the event (See: Broadcast Custom Event).
Actor
The actor that should receive the event. Accepts an actor name or alias.
Identifier
The name of the custom event.
Set Tint Color
Sets the tint color of the actor. To clear tint color use ClearTintColor or set RGBA to 255, 255, 255, 255.
Actor
The actor that should receive the event. Accepts an actor name or alias.
Color
These color values will be used to tint the model multiplicatively.
For example, a value of (0, 0, 255) will cause the model to lose all of its red and green colors, and become bright blue; a value of (128, 128, 1024) will weaken the model's red and green colors by half, and amplify the blue color by 400%.
R
G
B
A
Priority Label
Label
Use labels to apply multiple tint colors. Only the current tint color with the highest priority will be used. Use ClearTintColor to remove tint color by label.
Priority
Setting tint color with higher priority will overwrite any tint colors with lower priority. The default priority is 50.
Duration
If set, the tint color will be applied over this duration.
Ease
EnumType: ActorAction.EaseType
The easing function to use if the tint color is applied over a duration.
Ease Intensity
Optional parameter for some easing functions (elastic, back, and bounce) to adjust the amplitude or overshoot amount.
Set Mesh Effect
Applies a mesh effect to to the model, overriding any existing mesh effects.
It's recommended to use Apply Mesh Effect instead as it doesn't override existing mesh effects.
Actor
The actor that should receive the event. Accepts an actor name or alias.
Effect
dcei.engine.proto.ActorAction.SetMeshEffect.effect,,The mesh effect to apply.
Play Music
Used to set the game's music track.
Music Name
The music asset to play.
Push
Whether to save the previously playing music to a stack. This is useful if you want to resume that music later (using Stop Music with the pop flag set to true).
Stop Music
Used to stop the game's music track.
Pop
If set to true, will play the previously saved music. If not set, the music will simply stop.
Shake Camera
Shakes the camera.
Parameters
If no parameters are set, the default camera shake will be used.
Duration
The duration of the camera shake.
Strength
The magnitude of the camera shake.
Vibrato
The vibration intensity of the camera shake.
Set Visibility
Modifies the visibility of the actor. Hidden actors can't be selected or otherwise interact with the cursor.
Actor
The actor that should receive the event. Accepts an actor name or alias.
Visibility
If disabled, hide the actor. If enabled, show the actor.
Set Model Scale
The actor that should receive the event. Accepts an actor name or alias.
Sets the model scale of the actor. The default model scale is 1.
Actor
The name of the actor that should receive the event. Can be aliases.
Model Scale
Adjusts the size of the model over a duration. Using model scale 0 defaults to 1.
Model Scale Expression
The evaluated expression is added to the Model Scale.
Duration
If set, the scale will be applied over this duration. This can be used to make simple grow/shrink animations.
Ease
EnumType: ActorAction.EaseType
The easing function to use if the scale is applied over a duration.
Ease Intensity
Optional parameter for some easing functions (elastic, back, and bounce) to adjust the amplitude or overshoot amount.
Broadcast Custom Event
Similar Send Custom Event but the message is sent to all matching actors within the actor scope.
Actor
The actor that should receive the event. Accepts an actor name or alias.
Identifier
The name of the custom event.
Apply Mesh Effect
Applies a mesh effect to the actor. Mesh effects are similar to shaders effects.
Actor
The actor that should receive the event. Accepts an actor name or alias.
Effect
The mesh effect to apply.
Remove Mesh Effect
Removes a mesh effect from the actor.
Actor
The actor that should receive the event. Accepts an actor name or alias.
Effect
The mesh effect to remove.
Set Team Color
Applies colorization to specific sections of model's texture.
Currently only works with support models. Check the Asset Previewer to see which models support team color. Feel free to request more.
Actor
The actor that should receive the event. Accepts an actor name or alias.
Color
MessageType: RGBAColor
These color values will be used to colorize the team color sections of the model, using the A value as the blending value.
For example, a value of (0, 0, 255, 255) will set the team color to bright blue. Setting the A value to 0 means that no team color will be applied.
Second Color
MessageType: RGBAColor
These color values will be used to colorize the secondary team color sections of the model.
Set Shadow Height
Sets the shadow height of the actor.
Can be used to make shadows appear for models on cliffs.
Actor
The actor to set the shadow height for. Accepts an actor name or alias.
Shadow Height
The value to set shadow height.
Play Animation With Duration
Similar to Play Animation but supports a duration for the animation.
Clip Id
Which animation to play. The default animation is "Attack".
Clip Duration
The duration of the animation.
Use Real Timer
Pause Animation
Used to pause a currently playing animation on the actor.
Clip Id
Which animation to pause. The default animation is "Attack".
Resume Animation
Resumes a paused animation on the actor.
Clip Id
Which animation to resume. The default animation is "Attack".
Play Sound
MessageType: PlaySound
Used to play a sound from an actor directly.
The alternative is to create a separate sound actor.
Set Scale Multiplier
Sets the scale of the actor across individual axes. The final scale will be these values multiplied by the Model Scale.
Actor
The name of the actor that should receive the event. Accepts an actor name or alias.
Scale
MessageType: InitialScale
Specified the initial scale of the model and it can be non-uniform, this is display only, the finial display will multiply this by actual model scale
Duration
If set, the scale multiplier will be applied over this duration. This can be used to make simple grow/shrink animations.
Ease
EnumType: ActorAction.EaseType
The easing function to use if the scale multiplier is applied over a duration.
Ease Intensity
Optional parameter for some easing functions (elastic, back, and bounce) to adjust the amplitude or overshoot amount.
Set Shadow
Used to hide or show the shadow of an actor.
Actor
The name of the actor that should receive the event. Accepts an actor name or alias.
Shadow Display
When unchecked, hides the actor's shadow.
Clear Tint Color
Removes tint color from the actor.
Actor
The actor that should receive the event. Accepts an actor name or alias.
Label
If set, only the tint with the matching label will be removed. Otherwise all tint color will be removed.
Set Outline
Sets the outline render for the actor
Actor
The name of the actor that should receive the event. Accepts an actor name or alias.
Outline Color
Sets the outline color. The default is black.
Outline Width
The outline width to use. The default is 1.
Clear Outline
Clear the outline render for the actor
Actor
The name of the actor that should receive the event. Accepts an actor name or alias.
Set Walk Animation
Sets the walk animation for the actor
Clip Id
Which animation to play when unit is moving.
Set Idle Animation
Sets the idle animation for the actor
Clip Id
Which animation to play when unit is idle.
Set Dynamic Aoe Params
Sets the cone angle and inner radius for dynamic AOEs
Cone Angle
The angle of the AOE
Inner Radius
The inner radius (as a fraction of the outer radius)
Set Particle Properties
Sets particle start properties
Particle Properties
Set Start Lifetime
How long will the particle last?
Min Value
Max Value
Set Start Speed
How fast does the particle move when spawned?
Min Value
Max Value
Set Start Size
Min Value
Max Value
Set Start Color
Color A
MessageType: RGBAColor
A random color will be picked in between ColorA and ColorB
Color B
MessageType: RGBAColor
Set Simulation Speed
Sets the simulation speed of the entire particle system. Unlike SetStartSpeed which affects only the move speed of spawned particles (e.g., it does nothing if the spawned particles only rotate but not move), this makes everything move faster or slower. Default is 1.
Value
Particle Sub System
Which subsystem this event should affect
Set Model
Sets a new model for an actor, only sprite resources are supported for now