Instructions

From Desynced Wiki
Revision as of 16:59, 25 August 2023 by Phanzor (talk | contribs) (Text formatting issue upon saving changes)

An instruction is a node within behavior programming. Each instruction is composed of .LUA code.

List of Instructions and how they can be used [Community Member added - May not be accurate or contain all possible use cases] -- WIP

Unit

Move

Component

Flow

Math

Compare Number

The "Compare Number" Component takes in a value and compares that value against another. This can be used to compare two numbers as intended or used as an if statement. To use this node as an if statement you can compare a value of 0/1 against 0 this will allow you to use the "If Larger" and "If Smaller" as true or false to determine a conditional statement.

Comparing a variable against the value of 100. This allows for the node to be used as a conditional statement.

Global

Distance

The "Distance" component takes a location based input (unit world location) and stores the distance from the that input to the unit your script is being run on in the result. This can be used identify how far one unit is away from another.

Using the signal register as an input (which is set to a unit world location) and storing the distance value as a variable.

Get Home

The "Get Home" component gets the factions Home Unit and writes the result to a Unit Register or a Variable. The result can then be referenced later as the home location.

Writing the Home value to the Signal Register