Trigger API Reference DCEI Types - BLKTower/TestWiki GitHub Wiki
Trigger API Reference\DCEI Types
Type UnitBehaviorStatusUnitBehaviorStatus
{
string name
int stack_count
}Unit's behavior stats, including behavior name and stack count.
Type BehaviorFilterBehaviorFilter
{
string name
string family
}Usually used to make something on happens with certain behaviors.
Type AbilityFilterAbilityFilter
{
string name
string family
}Usually used to make something on happens with certain abilities.
Type WeaponFilterWeaponFilter
{
string name
string family
}Usually used to make something on happens with certain weapons.
Type CriticalFilterCriticalFilter
{
bool critical_only
bool not_critical_only
}Usually used to make the effect only triggers with only critical or not critical damage events.
Type UnitTagStatusUnitTagStatus
{
string name
int stack_count
}Tag status on unit, with name and stack count.
Type UnitFilterUnitFilter
{
Nullable<int> team
string name
}Type UnitUnit
{
Entity UnsafeEntity
UnitFilter filter
}Type RegionRegion
{
Entity UnsafeEntity
}Type Float2Float2
{
float x
float y
}local pos = {x = 1, y = 1}
DCEI.SetUnitPosition2D(unit, pos.x, pos.y)Type AbilityCostAbilityCost
{
float health
float mana
float gold
}function OnAbilityUse()
local id = DCEI.TriggeringAbilityId
local name = DCEI.TriggeringAbilityName
DCEI.LogMessage(name .. " use")
local cost = DCEI.GetAbilityCost(name)
for key, value in pairs(cost) do
DCEI.LogMessage(key .. " : " .. value)
end
end
DCEI.TriggerAddUseAbilityEvent(DCEI.UnitAny, OnAbilityUse)Type BehaviorModifierBehaviorModifier
{
float scaled
float unscaled
float additive_factor
float positive_unified_factor
float negative_unified_factor
float multiplier_factor
}Type Float3Float3
{
float x
float y
float z
}Can be used as Position 3D or Scale 3D.
local duration = 1
local ease = "Linear"
local k1 = {x = min_scale, y = min_scale, z = min_scale}
local k2 = {x = max_scale, y = max_scale, z = max_scale}
local anim = DCEI.AnimateFrameScale(layout.Frame, k1, k2, duration, ease)Type EffectContextEffectContext
{
unit caster
unit source
unit target
Float2 target_location
string damage_source_type
string damage_source_name
}Type UnitLabelOptionsUnitLabelOptions
{
Offset offset
bool center_at_unit_origin
bool center_at_unit_top
}Built in unit label option table.
local label_options = {offset = {right = 1, up = 1, front = 1}, center_at_unit_origin = true, center_at_unit_top = true}
DCEI.ShowUnitLabel(unit, "Unit", label_options)Type OffsetOffset
{
double right
double up
double front
}Helper table in some API for offset
local frame = DCEI.NewText(DCEI.GetUiRoot())
DCEI.SetText(frame, "Bob")
local unit = DCEI.CreateUnit(1, 1, "Standard MeleeUnit", 16, 16, 0, -1)
local options = {
offset = {up = 1.2},
center_at_unit_origin = true
}
DCEI.AttachToUnit(frame, unit, options)Type TextOptionsTextOptions
{
Offset offset
}Type ColorRGBAColorRGBA
{
float r
float g
float b
float a
}
Color table. Notice the float is 01 instead of 0255.
local frame = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetBackgroundImageColor(frame, 251/255, 79/255, 79/255, 1)
DCEI.SetSize(frame, 100, 100)Type ColorRGBColorRGB
{
float r
float g
float b
}
Color table. Notice the float is 01 instead of 0255.
DCEI.SetTextFrameColorRGB(text_frame, { r = 0.5, g = 0.5, b = 0.5 })Type WaypointOptionsWaypointOptions
{
string waypoint_name
float dispersal
bool use_natural_dispersal
int node_index
}Type ScreenBackgroundOptionsScreenBackgroundOptions
{
Color color
float duration
}Type AreaOffsetAreaOffset
{
float left
float right
float top
float bottom
ColorRGBA debug_draw_color
}Type JoystickOptionsJoystickOptions
{
Float2 anchor
Float2 offset
bool disable_wasd
bool disable_arrow_keys
int joystick_id
bool dynamic_position
bool always_show
float radius
AreaOffset active_area_offset
string handle_icon
ColorRGBA handle_icon_color
string background_icon
ColorRGBA background_icon_color
bool handle_rotation
Transform parent
JoystickOptions Default
}All the joystick options for virtual joystick.
Type JoystickButtonOptionsJoystickButtonOptions
{
string icon
bool hide
}All the joystick button options for virtual joystick.
Type BigHeadMessageOptionsBigHeadMessageOptions
{
bool pause
object on_dismiss
double delay
Color message_box_color
Color title_box_color
}Type SpawnGroupUnitSpawnGroupUnit
{
string unit
double delay
double offset
}Type SpawnGroupSpawnGroup
{
string name
string route_name
bool hide_wave_indicator
double initial_delay
string group_pattern
string unit
string pattern
int count
List<string> yield_group
}Type SpawnWaveInitialBehaviorSpawnWaveInitialBehavior
{
string name
int stack
}Type SpawnWaveOptionsSpawnWaveOptions
{
double total_gold
double bonus_gold
double start_delay
double call_wave_countdown
List<SpawnGroup> groups
List<SpawnWaveInitialBehavior> behaviors
}