LUA properties for Movement - LemADEC/WarpDrive GitHub Wiki
Ship controller specific properties
dim_positive, dim_negative
Type: 3 Numbers
Range: 0 to 1024
Those are ship dimensions on each axis. Ship core counts as 0, first block out as 1. Ship controller is front. dim_positive sets Front, Right, Up dimensions. dim_negative sets Back, Left, Down dimensions.
command
Type: String
Range: "OFFLINE", "IDLE", "MANUAL", "SUMMON", "HYPERDRIVE", "GATE", "MAINTENANCE"
Set the current mode for the ship core. You'll need to call 'enable(true)' to actually start anything.
"OFFLINE" disable the core, allowing intersecting ships to move around.
"IDLE" is just that.
"MANUAL" jump the ship manually (moving x blocks on Front/Right/Up axis, and rotation).
"SUMMON" teleport a nearby crew member aboard. Use the targetName property to define the player name.
"HYPERDRIVE" control the warp field to transition in and out of hyperspace.
"GATE" activate a jumpgate. Use the targetName property to define the target jumpgate name.
"MAINTENANCE" is the same as IDLE (for now).
shipName, coreFrequency
Type: String
Range: (no specific constrains)
Name of this ship as reported in logs and to other players. coreFrequency was replaced by shipName as of 1.3.31.
targetName, targetJumpgate
Type: String
Range: (any valid jumpgate, player or beacon name)
Name of the target jumpgate, player or beacon affected by current command. targetJumpgate was replaced by targetName as of 1.3.31.
movement
Type: 3 Numbers
Range: -2^31 to 2^31-1
Movement along Front, Up, and Right axis. 0 means no movement on that axis. Negative means you're going backward.
rotationSteps
Type: Number
Range: 0 to 3
Number of 90 deg rotations to the right of the ship. 0 means no rotation.
beaconFrequency (deprecated)
Type: String
Range: (no specific constrains)
Name of the beacon for this ship core if another ship tries to reach it in BEACON mode. The shipCore can no longer be used as beacon as of 1.3.31. You can select a target beacon with targetName() as of 1.3.31.
distance, direction (deprecated)
Those properties are obsolete. They were used to move your ship in BASIC and LONG jump modes.
mode (deprecated)
Type: Number
Range: 0 to 6
Set the current mode for the ship core. You'll need to call 'jump' to actually start anything.
IDLE(0) is just that.
BASIC_JUMP(1) allows precise directional jumps (moving x blocks on Front/Right/Up axis).
LONG_JUMP(2) is deprecated since 1.3.19. It was used to de-multiply your jump distance in hyperspace. You can now use mode 1 for more precise positioning in hyperspace.
-reserved-(3) is deprecated. It was a prototype idea, don't use it.
BEACON_JUMP(4) enables jumping to a specific beacon. A beacon is the ship core with a player standing on top of it.
HYPERSPACE(5) controls the warp field to transition in and out of hyperspace.
GATE_JUMP(6) uses a jumpgate to transition in and out of hyperspace.
This was replaced with the command() property as of 1.3.31.
Transporter core specific properties
transporterName
Type: String, UUID
Range: any
Set a player-friendly signature for this transporter room setup. Changing the name will renew the signature UUID.
Returns the player-friendly and internal signature.
remoteLocation
Type: String
Range: a player name
or
Type: UUID
Range: a transporter room signature UUID
or
Type: 3 Numbers
Range: coordinates
Set the remote location for the transporter room. This can be a player name, or the signature UUID of another transporter room or x,y,z coordinates in current dimension.
An emergency beacon will always take priority without overwriting this value. In other words, this values are ignored during an emergency call, and you can't read the beacon location from LUA.
lock
Type: Boolean
Range: true, false
Set the locking request to the transporter room. Assuming the core is enabled, this will start locking on the previously defined remote location.
An emergency beacon will force the locking request.
energyFactor
Type: Number
Range: 1.0 to 10.0
Set the energy factor applied during locking and energizing. Increase the factor to lock with more strength and speed.
An emergency beacon will force a mini locking strength of 400 %.
energize
Type: Boolean
Range: true, false
Set the energizing request to the transporter room. Assuming the core is enabled, this will start energizing using the current locking strength.
An emergency beacon will force the energizing request, then disable it once at least one entity was transferred.