Space Engineers

Space Engineers

[Outdated] Easy Ballistic Missile Script
 This topic has been pinned, so it's probably important
Alysius  [developer] 8 Jul, 2016 @ 7:47am
In-Flight Command
In-Flight Command

You can update the target location while missile is in-flight by setting the Title of the R_TARGET Text Panel with the GPS coordinates (Just paste the coordinates).

You can also send commands to the missile in-flight by setting the Custom Data of the R_TARGET Text Panel. The command string is in the following format:

<COMMAND1>:<VALUE1>,<COMMAND2>:<VALUE2>,..... and so on.

Note: Some commands do not have parameter values.

The following is a list of supported commands:

ABORT - Forces the missile to stop homing and fly straight. After this command is issued, no further command can be sent.

ACT and SET commands are also available. See the respective section below.


ACTx

Usage: ACTx:<Block Name>:<Action Name>

Where x can be one of the following:

B - Triggers an action for all blocks with specified name.
P - Triggers an action for all blocks starting with specified name.
S - Triggers an action for all blocks ending with specified name.
W - Triggers an action for all blocks containing specified name.

Example Commands:

ACTB:Warhead:StartCountdown (Start countdown of blocks with name exactly as "Warhead")
ACTP:Thruster:OnOff_On (Turn on all blocks with name starting with "Thruster")


SETxy

Usage: SETxy:<Block Name>:<Property Name>:<Property Value>

Where x can be one of the following:

B - Sets property for all blocks with specified name.
P - Sets property for all blocks starting with specified name.
S - Sets property for all blocks ending with specified name.
W - Sets property for all blocks containing specified name.

Where y can be one of the following:

P - Sets property value as float.
B - Sets property value as boolean (True or False).
D - Sets property value equals to <Distance To Target> divide by <Property Value>. (See example)
S - Sets property value equals to <Missile Current Speed> divide by <Property Value>. (See example)
T - Sets property value equals to <Estimated Time To Impact> divide by <Property Value>. (See example)
A - Adds <Property Value> to the existing value of the block's specified property.
M - Multiplies <Property Value> to the existing value of the block's specified property.

Example Commands:

SETBP:Gyroscope 1:Yaw:10 (Set the Yaw value of "Gyroscope 1" to 10)
SETBB:Remote:ShowOnHUD:True (Set the ShowOnHUD value of "Remote" to True)
SETPP:Warhead:DetonationTime:5 (Set Detonation Time to 5 for all blocks with name starting with "Warhead")
SETBD:Antenna:Range:0.5 (If missile is 1500m to target, it will set Range of "Antenna" to 3000; 1500 / 0.5 = 3000)
SETBS:Antenna:Range:2 (If is moving at 100m/s, it will set Range of "Antenna" to 50; 100 / 2 = 50)
SETBT:Warhead:DetonationTime:1 (If is estimated to impact in 12 seconds, it will set Detonation Time of "Warhead" to 12; 12 / 1 = 12)
SETBA:Warhead:DetonationTime:3 (If Detonation Time of "Warhead" is 12 seconds, it will be changed to 15 seconds; 12 + 3 = 15)
SETBM:Warhead:DetonationTime:2 (If Detonation Time of "Warhead" is 15 seconds, it will be changed to 30 seconds; 15 * 2 = 30)


TGx

Usage: TGx:<Trigger Value>:<Trigger Command>

Where x can be one of the following:

R - Triggers the specified command when missile is spinning with RPM at or more than the specified <Trigger Value>.
D - Triggers the specified command when missile is within the distance specified by <Trigger Value>.
E - Triggers the specified command when missile has travelled the distance specified by <Trigger Value>, starting from the time this command is issued.
T - Triggers the specified command X seconds later, where X is the specified <Trigger Value>.

Example Commands:

TGR:25:ACTP:Lock:OnOff_Off (Execute the command "ACTP:Lock:OnOff_Off" when missile is spinning at or more than 25 RPM)
TGD:2000:ACTB:Warhead:StartCountdown (Execute the command "ACTB:Warhead:StartCountdown" when missile is within 2000m to target)
TGE:500:ACTB:Warhead:StartCountdown (Execute the command "ACTB:Warhead:StartCountdown" when missile has moved 500m since this command is issued)
TGT:5:ACTB:Warhead:StartCountdown (Execute the command "ACTB:Warhead:StartCountdown" 5 seconds later)


SPIN

Usage: SPIN:<RPM>

Spins the missile at the specified RPM.

Example Commands:

SPIN:10 (Spin the missile at 10 RPM)


DISCONNECT

Usage: DISCONNECT

Unbinds the R_TARGET panel. After this command, the missile will home in on its last input target location and do not take command from R_TARGET again.


ZTH

Usage: ZTH

Turns off all thrusters on the missile, including side thrusters.

Example Commands:

ZTH (Turns off all thrusters)
Last edited by Alysius; 12 Feb, 2018 @ 7:01am
< >
Showing 1-3 of 3 comments
geniusface1234 15 Dec, 2016 @ 5:59pm 
Where would you put these commands?
Plongo 12 Feb, 2018 @ 6:43am 
Text panels no longer have private text field. So commands cannot be issued.
Alysius  [developer] 12 Feb, 2018 @ 7:02am 
Corrected typo error. Should be "Custom Data" now for issuing commands.
< >
Showing 1-3 of 3 comments
Per page: 1530 50