Trigger API Reference\DCEI Functions\Tower Defense
void ShowDotManaBar(unit unit)
void ShowDotManaBar(unit unit)
Description
Parameters
- unit
unit
the unit to create the mana bar for.
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
Parameters
- unit
unit
the unit to create the health bar for.
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
Parameters
- unit
unit
the unit to create the health bar for.
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
- float
x
the x coordinant of point to find nearest path point to - float
z
the z coordinant of point to find nearest path point to - bool
ignoreRallyDisabledLanes
if true, ignores waypoint paths with the "rallyDisabled" flag checked.
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
- int
value
How much to increase the tower build limit by.
Example Usage
-- See also `RemoveTowerBuildLimit`
DCEI.IncreaseTowerBuildLimit(2)