Trigger API Reference\DCEI Functions\Actor

int GetAnimationClipId(string name)

int GetAnimationClipId(string name)

Description


Get animation clip Id according to the clip name.

Parameters

Example Usage

local id = DCEI.GetAnimationClipId("attack")
DCEI.CompileActorAction('{"playAnimation": {"clipId": ' .. tostring(id) .. '}}')

void SendSetModelScaleActorAction(unit unit, SetModelScaleActorAction action, string targetActorName = null)

void SendSetModelScaleActorAction(unit unit, SetModelScaleActorAction action, string targetActorName = null)

Description


Send a model scale actor action to a unit's actor (or an actor in its scope).

Parameters

Example Usage

local team_id = 1
local player_id = 1
local unit_type = DCEI.Unit("Standard MeleeUnit")
local x, z = 16, 16
local target = DCEI.CreateUnit(team_id, player_id, unit_type, x, z)
local action = {
  actor = "",
  model_scale = 2.0,
  duration = 1.0,
  ease = "InBounce",
  ease_intensity = 1.0,
}

DCEI.SendSetModelScaleActorAction(target, action)

void SendCreateActorAction(unit unit, CreateActorAction action, string targetActorName = null)

void SendCreateActorAction(unit unit, CreateActorAction action, string targetActorName = null)

Description


Send a create actor actor action to a unit's actor (or an actor in its scope).

Parameters

Example Usage

local team_id = 1
local player_id = 1
local unit_type = DCEI.Unit("Standard MeleeUnit")
local x, z = 16, 16
local target = DCEI.CreateUnit(team_id, player_id, unit_type, x, z)
local action = {
  actor = "Test Model",
  host_site = {"SiteWeaponLeft"},
  host_site_operations = {"SOp Up Dot 1", "SOp Left Dot 5"},
  aliases = {},
  detached = false,
}

DCEI.SendCreateActorAction(target, action)

void SendDestroyActorAction(unit unit, DestroyActorAction action, string targetActorName = null)

void SendDestroyActorAction(unit unit, DestroyActorAction action, string targetActorName = null)

Description


Send a destroy actor actor action to a unit's actor (or an actor in its scope).

Parameters

Example Usage

local team_id = 1
local player_id = 1
local unit_type = DCEI.Unit("Standard MeleeUnit")
local x, z = 16, 16
local target = DCEI.CreateUnit(team_id, player_id, unit_type, x, z)
local action = {
  actor = "Test Model",
}

DCEI.SendDestroyActorAction(target, action)

void SendSendCustomEventActorAction(unit unit, SendCustomEventActorAction action, string targetActorName = null)

void SendSendCustomEventActorAction(unit unit, SendCustomEventActorAction action, string targetActorName = null)

Description


Send a send custom event actor action to a unit's actor (or an actor in its scope).

Parameters

Example Usage

local team_id = 1
local player_id = 1
local unit_type = DCEI.Unit("Standard MeleeUnit")
local x, z = 16, 16
local target = DCEI.CreateUnit(team_id, player_id, unit_type, x, z)
local action = {
  actor = "",
  identifier = "test_custom_event",
}

DCEI.SendSendCustomEventActorAction(target, action)

void SendPlayAnimationActorAction(unit unit, PlayAnimationActorAction action, string targetActorName = null)

void SendPlayAnimationActorAction(unit unit, PlayAnimationActorAction action, string targetActorName = null)

Description


Send a play animation actor action to a unit's actor (or an actor in its scope).

Parameters

Example Usage

local team_id = 1
local player_id = 1
local unit_type = DCEI.Unit("Standard MeleeUnit")
local x, z = 16, 16
local target = DCEI.CreateUnit(team_id, player_id, unit_type, x, z)
local action = {
  clip_id = "action",
  duration = 0.56,
  use_real_timer = false,
}

DCEI.SendPlayAnimationActorAction(target, action)

void SendPauseAnimationActorAction(unit unit, PauseAnimationActorAction action, string targetActorName = null)

void SendPauseAnimationActorAction(unit unit, PauseAnimationActorAction action, string targetActorName = null)

Description


Send a pause animation actor action to a unit's actor (or an actor in its scope).

Parameters

Example Usage

local team_id = 1
local player_id = 1
local unit_type = DCEI.Unit("Standard MeleeUnit")
local x, z = 16, 16
local target = DCEI.CreateUnit(team_id, player_id, unit_type, x, z)
local action = {
  clip_id = "action",
}

DCEI.SendPauseAnimationActorAction(target, action)

void SendSetVisibilityActorAction(unit unit, SetVisibilityActorAction action, string targetActorName = null)

void SendSetVisibilityActorAction(unit unit, SetVisibilityActorAction action, string targetActorName = null)

Description


Send a set visibility actor action to a unit's actor (or an actor in its scope).

Parameters

Example Usage

local team_id = 1
local player_id = 1
local unit_type = DCEI.Unit("Standard MeleeUnit")
local x, z = 16, 16
local target = DCEI.CreateUnit(team_id, player_id, unit_type, x, z)
local action = {
  actor = "",
  visibility = false,
}

DCEI.SendSetVisibilityActorAction(target, action)

void SendSetTintColorActorAction(unit unit, SetTintColorActorAction action, string targetActorName = null)

void SendSetTintColorActorAction(unit unit, SetTintColorActorAction action, string targetActorName = null)

Description


Send a set tint color actor action to a unit's actor (or an actor in its scope).

Parameters

Example Usage

local team_id = 1
local player_id = 1
local unit_type = DCEI.Unit("Standard MeleeUnit")
local x, z = 16, 16
local target = DCEI.CreateUnit(team_id, player_id, unit_type, x, z)
local action = {
  actor = "",
  color = {r = 1.0, g = 0.5, b = 0.5, a = 0.25},
  duration = 1.0,
  ease = "InBounce",
  ease_intensity = 1.0,
}

DCEI.SendSetTintColorActorAction(target, action)