Trigger API Reference DCEI Functions Actor0 - funovus/editor-wiki GitHub Wiki
Table of Contents
- [Trigger API Reference\DCEI Functions\Actor](#trigger-api-referencedcei-functionsactor)
* [int CompileActorAction(string action)](#int-compileactoractionstring-action)
* [void SendActorAction(unit unit, int compiledActorActionId, string targetActorName)](#void-sendactoractionunit-unit-int-compiledactoractionid-string-targetactorname)
|
Trigger API Reference\DCEI Functions\Actor {Trigger-API-ReferenceDCEI-FunctionsActor}
int CompileActorAction(string action)
Compiles the given action for an actor and returns a corresponding integer ID.
local action_id = DCEI.CompileActorAction("{\"create\":{\"actor\":\"Standard RangedUnit\"}}")
DCEI.SendActorAction(unit, action_id, "Standard MeleeUnit")
void SendActorAction(unit unit, int compiledActorActionId, string targetActorName) {void-SendActorActionunit-unit-int-compiledActorActionId-string-targetActorName}
void SendActorAction(unit unit, int compiledActorActionId, string targetActorName)
Sends the compiled actor action to the given actor on the given unit.
-
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.
local action_id = DCEI.CompileActorAction("{\"create\":{\"actor\":\"Standard RangedUnit\"}}")
DCEI.SendActorAction(unit, action_id, "Standard MeleeUnit")