Skip to content
p-blomberg edited this page Dec 28, 2011 · 4 revisions
  1. summary List of all ENTACTION commands.

Table of Contents

Syntax

See Protocol

List of ENTACTION commands

MOVE

Tell the entity to move itself to a new location. The client can monitor the movement, in order to redraw the screen with the entity at a correct location, using ENTINFO (see [Protocol]).

Example

  12 ENTACTION Miner_0001 MOVE 15 16 17
  12 OK

Supported entities

  • Gateway
  • Miner
  • Ship

BUILD

Tell the entity to construct a new entity of type TYPE. TYPE must be a valid class name, written in CamelCase.

Example

  9 ENTACTION Gateway_0001 BUILD Miner
  9 OK

Supported entities

  • Gateway

SET_CARGO_TYPE

Tells a miner to accept the specified cargo type.

Example

  8 ENTACTION Miner_0001 SET_CARGO_TYPE CopperOre
  8 OK

Supported entities

  • Miner

LOAD

Retrieve cargo from entity.

Example

  51 ENTACTION Gateway_0001 LOAD Miner_0001
  51 OK
  52 ENTINFO Miner_0001
  52 OK {
  	"Buildlist": [], 
  	"Cargo": [
  		[
  			{
  				"Buildlist": [], 
  				"Cargo": [], 
  				"Id": "CopperOre_0001", 
  				"Minable": false, 
  				"Owner": null, 
  				"Position": null, 
  				"Type": "CopperOre", 
  				"velocity": [
  					0.0, 
  					0.0, 
  					0.0
  				]
  			}, 
  			50.0
  		]
  	], 
  	"Id": "Miner_0001", 
  	"Minable": false, 
  	"Owner": 1, 
  	"Position": [
  		4.9853140312606001, 
  		6.136428096636025, 
  		0.0
  	], 
  	"Type": "Miner", 
  	"actions": [
  		"MOVE", 
  		"SET_CARGO_TYPE", 
  		"GO_TO_PLANET"
  	], 
  	"velocity": [
  		-0.099054986676637091, 
  		-0.013715305847528548, 
  		0.0
  	]
  }
  53 ENTINFO Gateway_0001
  53 OK {
  	"Buildlist": [
  		"Ship", 
  		"Station", 
  		"Miner"
  	], 
  	"Cargo": [
  		[
  			{
  				"Buildlist": [], 
  				"Cargo": [], 
  				"Id": "CopperOre_0001", 
  				"Minable": false, 
  				"Owner": null, 
  				"Position": null, 
  				"Type": "CopperOre", 
  				"velocity": [
  					0.0, 
  					0.0, 
  					0.0
  				]
  			}, 
  			0
  		]
  	], 
  	"Id": "Gateway_0001", 
  	"Minable": false, 
  	"Owner": 1, 
  	"Position": [
  		4.0, 
  		6.0, 
  		0.0
  	], 
  	"Type": "Gateway", 
  	"actions": [
  		"LOAD", 
  		"MOVE", 
  		"BUILD"
  	], 
  	"velocity": [
  		0.0, 
  		0.0, 
  		0.0
  	]
  }

Supported entities

  • Gateway

ORDER_ADD

Add order to order list. Server will reply with order id.

Example

  59 ORDER_ADD Miner_0001 MOVE 15 16 17
  59 ORDER_ID 0001

Supported entities

All player-controlled entities

ORDER_REMOVE

Remove order from list. Server will reply with OK

Example

  60 ORDER_REMOVE Miner_0001 0001
  60 OK

Supported entities

All player-controlled entities

ORDER_LIST

Get list of orders.

Example

  61 ORDER_LIST Miner_0001
  61 OK {
  	0001: ["MOVE", "15", "16", "17"], 
  	0002: ["SET_CARGO_TYPE", "CopperOre"]
  }

Supported entities

All player-controlled entities