An instruction is a node within behavior programming. Pins are the small connecting points the edges. The squares are inputs/outputs for data processed by an instruction. If any data is evaluated, there will be multiple pins on the right hand side which dictate where the behavior will proceed next. An unlinked pin will return the behavior to the start.
Refer to Guides#Behavior_Guides for some in-depth implementations of instructions.
Below is a list of all instructions available in-game.
Math
Add
|
Adds a number or coordinate to another number or coordinate
|
Compare Number
|
Divert program depending on number of Value and Compare
|
Copy
|
Copy a value to a frame register, parameter or variable
|
Divide
|
Divides a number or coordinate from another number or coordinate
|
Get Battery
|
Gets the value of the Battery level as a percent
|
Get Health
|
Gets a units health as a percentage, current and max
|
Get Self
|
Gets the value of the Unit executing the behavior
|
Is Working
|
Checks whether a particular component is currently working
|
Modulo
|
Get the remainder of a division
|
Multiply
|
Multiplies a number or coordinate from another number or coordinate
|
Set Number
|
Sets the numerical/coordinate part of a value
|
Subtract
|
Subtracts a number or coordinate from another number or coordinate
|
Component
Mine
|
Mines a single resource
|
Radar
|
Scan for the closest unit that matches the filters
|
Global
Get Trust
|
Gets the trust level of the unit towards you
|
Get Type
|
Gets the type from an item or entity
|
Land
|
Tells a satellite that has been launched to land
|
Launch
|
Launches a satellite if equipped on an AMAC
|
Lookat
|
Turns the unit to look at a unit or a coordinate
|
Notify
|
Triggers a faction notification
|
Percent
|
Gives you the percent that value is of Max Value
|
Pings a Unit
|
Plays the Ping effect and notifies other players
|
Produce Unit
|
Sets a production component to produce a blueprint
|
Read Key
|
Attempts to reads the internal key of the unit
|
Remap
|
Remaps a value between two ranges
|
Move
Move East
|
Moves towards a tile East of the current location at the specified distance
|
Move North
|
Moves towards a tile North of the current location at the specified distance
|
Move South
|
Moves towards a tile South of the current location at the specified distance
|
Move Unit
|
Moves to another unit or within a range of another unit
|
Move West
|
Moves towards a tile West of the current location at the specified distance
|
Scout
|
Moves in a scouting pattern around the factions home location
|
Stop Unit
|
Stop movement and abort what is currently controlling the entities movement
|
Unit
Connect
|
Connects Units from Logistics Network
|
Count Items
|
Counts the number of the passed item in its inventory
|
Count Slots
|
Returns the number of slots in this unit of the given type
|
Disconnect
|
Disconnects Units from Logistics Network
|
Drop Off Items
|
Drop off items at a unit or destination
If a number is set it will drop off an amount to fill the target unit up to that amount
If unset it will try to drop off everything.
|
Get First Locked Id
|
Gets the first item where the locked slot exists but there is no item in it
|
Is Equipped
|
Check if a specific component has been equipped
|
Is Fixed
|
Check if a specific item slot index is fixed
|
Is Moving
|
Checks the movement state of an entity
|
Is Same Grid
|
Checks if two entities are in the same power grid
|
Lock Itemslot
|
Lock a specific itemslot index, a range of slot index via coord, or all storage slots
|
Match
|
Filters the passed entity
|
Package All
|
Tries to pack all packable units into items
|
Pick Up Items
|
Picks up a specific number of items from an entity
Will try to pick up the specified amount, if no amount
is specified it will try to pick up everything.
|
Read Radio
|
Reads the Radio signal on a specified band
|
Request Item
|
Requests an item if it doesn't exist in the inventory
|
Request Wait
|
Requests an item and waits until it exists in inventory
|
Switch
|
Filters the passed entity
|
Turn Off
|
Shuts down the power of the Unit
|
Turn On
|
Turns on the power of the Unit
|
Unlock Itemslot
|
Unlock a specific itemslot index, a range of slot index via coord, or all storage slots
|
Flow
Break
|
Break out of a loop
|
Clear Research
|
Clears a research from queue, or entire queue if no tech passed
|
Exit
|
Stops execution of the behavior
|
Have Item
|
Checks if you have at least a specified amount of an item
|
Is a
|
Compares if an item of entity is of a specific type
|
Jump
|
Jumps execution to label with the same label id
|
Label
|
Labels can be jumped to from anywhere in a behavior
|
Lock
|
Run one instruction at a time
|
Select Nearest
|
Branches based on which unit is closer, optional branches for closer unit
|
Unit Type
|
Divert program depending on unit type
|
Unlock
|
Run as many instructions as possible. Use wait instructions to throttle execution.
|
Wait Ticks
|
Pauses execution of the behavior until 1 or more ticks later (5 ticks=1 second)
|
For raw data on instructions: Refer to this data on instructions broken down into a table format.