Space Engineers

Space Engineers

39 ratings
[Outdated] Easy Ballistic Missile Script
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
12.328 KB
3 Jul, 2016 @ 5:31am
20 Aug, 2016 @ 5:48am
3 Change Notes ( view )

Subscribe to download
[Outdated] Easy Ballistic Missile Script

Description
While this script is not decommissioned and still working, I highly recommend using this much more advanced and easier to setup version - Trajectory Missile Script:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1111367429


This is the extremely simplified setup version of the Ballistic Missile Script. Full auto detection of missile configuration. Auto detection algorithm used is the same as the Easy Radar Homing Script.

This is a Vanilla Script. No Mods are required.



Missile Modes

[Mode 0] Fixed Target Ballistic Mode
Missile flies up straight and attempts to dive vertically down to a fixed target. Although you can still change target location in-flight, it will no home when missile is deployed.

[Mode 1] Moving Target Ballistic Mode
Missile flies up straight and attempts to dive vertically down to a moving target. You can change target location in-flight and the missile will home in all the way to target, even after missile deploys.

[Mode 2] Trajectory Mode
Missile flies up straight and follows a curved dive to the target. You can change target location in-flight and the missile will home in all the way to target, even after missile deploys.



Required Setup

Setup is extremely simplified. Script automatically detects everything, from which direction is the missile facing, to whether drift is required.
Just build your missile anyway you want it, following a few rules listed below:

For Missile

1) A Programmable Block loaded with this script.
2) A Timer Block to loop this script. Timer block calls "TriggerNow" of itself for looping and calls Programmable Block Action "Run with default Argument".
3) At least one Remote Control.
4) At least one Gyroscope.
5) At least one Thruster.
6) Exactly one Merge Block for detaching missile from ship.
7) At least one Battery.

- Make sure there is enough thrust to fly your missile. Put some thrusters for dampening missile when it is travelling horizontal to gravity.

For Launching Ship

- (Optional) A Text Panel named R_TARGET. This will be used to change the target location while missile is in-flight. See In-Flight Command Section.



How To Use

Method 1

Paste the GPS coordinates to the "Argument" field of the Programmable Block, then click "Run".
Make sure you have the strTimerLoopToStart variable set to the name of the looping Timer Block before hand, to loop the script.

Method 2

Make sure R_TARGET Text Panel is present.
Trigger the Timer Block to loop the script. Paste the GPS coordinates to the Public Title of the Text Panel.



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 Deploy Stage.

To configure the missile deployment commands, set the missileDeployCommand variable in the script to the command string in the following format:

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

The set of commands is exactly the same as specified in In-Flight Command Section.



In-Flight Command

You can update the target location while missile is in-flight by setting the Public 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 Private Title 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.

Text limit reached. See discussion for the list of available commands.
Popular Discussions View All (1)
3
12 Feb, 2018 @ 7:02am
PINNED: In-Flight Command
Alysius
30 Comments
Plongo 13 Feb, 2018 @ 3:59pm 
Excellent! Does it have the same sort of variables and commands as other scripts?
Alysius  [author] 13 Feb, 2018 @ 7:55am 
@Plongo Actually the Trajectory Missile Script is already released, just that I havent made any tutorials for it yet as it is simply too niche. Theres simply not enough users to make a video worth the time. However, you can still have use the script if you want anyway:

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1111367429
Plongo 12 Feb, 2018 @ 5:01pm 
Ah okay. I'll hold off on trying to get it to work and wait for the new script! Look forward to see what can be achieved with it! Cheers
Alysius  [author] 12 Feb, 2018 @ 7:07am 
This is a very old script actually, about to get decommissioned. The replacement is Trajectory Missile Script, which is used on my <Any>storm Missile Platform. It basically cruise high altitude then freefalls when near the target (freefall is calculated exactly to the right timing in pinpoint precision).
Plongo 12 Feb, 2018 @ 1:06am 
Okay, thank you. Having trouble detaching missile from grid, as the missile has multiple merge blocks. On your other script i could use the variable 'strDetachPortTag' to get the proper detach point. Plus used other variables for other things. Is it possible to add the variables to this script?
Alysius  [author] 12 Feb, 2018 @ 12:59am 
should not.... unless i forgot to update lol
Plongo 11 Feb, 2018 @ 11:45pm 
Does script still require timer block to loop script?
halipatsui 30 Sep, 2017 @ 4:30am 
Can i use missile deployment command to trigger timer blocks?
And if yes, how?
Crackpirate 27 Feb, 2017 @ 5:17pm 
Sounds good thank you!
Alysius  [author] 26 Feb, 2017 @ 5:51am 
@Crack The driftVectorReduction is too small. Increase to 1.5 to see if it works. This script has not been maintained for quite some time, due to previous physics issues.