Space Engineers

Space Engineers

Easy Radar Homing Script (Decommisioned)
 This topic has been pinned, so it's probably important
Alysius  [developer] 8 Jul, 2016 @ 7:49am
Missile Deployment Commands
Missile Deployment Commands

You can configure the missile to perform certain actions based on distance to target, distance travelled and spin rate achieved. The missile deployment commands will only be activated when it is in Homing Stage (Missile has completed the Launching Stage).

To configure the missile deployment commands, set the missileTriggerCommands variable in the script to the command string 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)
< >
Showing 1-3 of 3 comments
GI Joint 23 Nov, 2016 @ 1:49pm 
I've been trying to figure out the deployment commands, but I can't seem to get them to work. I need it to trigger two timer blocks at different distances. The "read R_TARGET private tile" is set to true, and I've checked that the timer blocks are working properly. That leave either; I'm not typing the commands correctly, typeing them in the right place, or both. Would you mind pointing me in the right direction?
This is the commands I've writen:
TGD:1200:ACTB:TECM:TriggerNow,TGD:800:ACTB:TCluster:TriggerNow
Alysius  [developer] 24 Nov, 2016 @ 4:45am 
All values are caae sensitive. If it is camera guided, the deploy wont work as the script doesnt know where the target is
GI Joint 24 Nov, 2016 @ 12:32pm 
I'm using GPS coordinates (setting 4). It launches and travels to the location, I just can't get the deployment commands to trigger.
< >
Showing 1-3 of 3 comments
Per page: 1530 50