Trigger API Reference\DCEI Functions\Tower Defense

void ShowDotManaBar(unit unit)

void ShowDotManaBar(unit unit)

Description


Show a dot-style mana bar.

Parameters

Example Usage

local unit = DCEI.CreateUnit(1, 1, DCEI.Unit("Creep Golem Light Player"), x, y)
DCEI.ShowDotManaBar(unit)

void ShowDotHealthBar(unit unit)

void ShowDotHealthBar(unit unit)

Description


Show a dot-style health bar.

Parameters

Example Usage

local unit = DCEI.CreateUnit(1, 1, DCEI.Unit("Creep Golem Light Player"), x, y)
DCEI.ShowDotHealthBar(unit)

void ShowShipHealthBar(unit unit)

void ShowShipHealthBar(unit unit)

Description


Show a ship-style health bar.

Parameters

Example Usage

local unit = DCEI.CreateUnit(1, 1, DCEI.Unit("Creep Golem Light Player"), x, y)
DCEI.ShowShipHealthBar(unit)

Float2 FindClosestPointOnRoad(float x, float z, bool ignoreRallyDisabledLanes)

Float2 FindClosestPointOnRoad(float x, float z, bool ignoreRallyDisabledLanes)

Description


Returns a point on the closest waypoint path to the given coordinants.

Parameters

Example Usage

DCEI.TriggerAddEffectEvent(DCEI.Effect("GameSystem MoveToLane LuaHook"), function()
    local target = DCEI.TriggeringEffectContext.target
    local targetPos = DCEI.GetUnitPosition2D(target)
    local pos = DCEI.FindClosestPointOnRoad(targetPos.x, targetPos.y, true)
    DCEI.Move(target, pos.x, pos.y)
end)

void ExitTargetingModeAndDeselectUnits()

void ExitTargetingModeAndDeselectUnits()

Description


Exits the targeting phase of ability casting, and deselects units.

Example Usage

function tutorialBigHand()
    DCEI.ExitTargetingModeAndDeselectUnits()
    DCEI.BlockGameWorld()

    DCEI.SetSpeedFactor(1 / 256)
    DCEI.BlockAllShipSpells()
end

void IncreaseTowerBuildLimit(int value)

void IncreaseTowerBuildLimit(int value)

Description


Increase the wild sky tower build limit.

Parameters

Example Usage

-- See also `RemoveTowerBuildLimit`
DCEI.IncreaseTowerBuildLimit(2)