Trigger API Reference DCEI Functions Actor0 - BLKTower/TestWiki GitHub Wiki

Table of Contents

Trigger API Reference\DCEI Functions\Actor {Trigger-API-ReferenceDCEI-FunctionsActor}

int CompileActorAction(string action) {int-CompileActorActionstring-action}

int CompileActorAction(string action)

Description

Compiles the given action for an actor and returns a corresponding integer ID.

Parameters

  • string action the action to compile, as a JSON string.

Example Usage

local action_id = DCEI.CompileActorAction("{\"create\":{\"actor\":\"Standard RangedUnit\"}}")
DCEI.SendActorAction(unit, action_id, "Standard MeleeUnit")

Related

void SendActorAction(unit unit, int compiledActorActionId, string targetActorName) {void-SendActorActionunit-unit-int-compiledActorActionId-string-targetActorName}

void SendActorAction(unit unit, int compiledActorActionId, string targetActorName)

Description

Sends the compiled actor action to the given actor on the given unit.

Parameters

  • unit unit the unit to send the actor action to.
  • int compiledActorActionId the actor action ID generated by CompileActorAction()
  • string targetActorName (optional) the actor to execute the compiled actor action. Must belong to the unit's actor scope. If no target actor is given, the unit's actor will be used instead.

Example Usage

local action_id = DCEI.CompileActorAction("{\"create\":{\"actor\":\"Standard RangedUnit\"}}")
DCEI.SendActorAction(unit, action_id, "Standard MeleeUnit")

Related

⚠️ **GitHub.com Fallback** ⚠️