Space Engineers

Space Engineers

273 ratings
[RETIRED] Whip's Missile Launch Script
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
4.005 KB
28 Jun, 2016 @ 4:59pm
1 Mar, 2019 @ 8:15pm
4 Change Notes ( view )

Subscribe to download
[RETIRED] Whip's Missile Launch Script

In 1 collection by Whiplash141
Whip's Script Archive
5 items
Description
This code is no-longer supported! New version can be found here:
https://sp.zhabite.com/sharedfiles/filedetails/?id=2108744940


  • Code now fires missiles alphabetically, this will make them fire in order!
  • You can now kill guidance of any active missiles by running the code with the argument "kill"


This code allows you to fire my Optically Guided Missiles with only one button press! No more messy toolbar setups are needed! Each time you run the program with the argument "fire" the code picks the closest missile and fires it. This allows users to reload their missiles without the fear of their toolbar binds breaking after the first salvo!

You can also kill guidance on any active missiles by running the argument "kill"!


See the video for a setup walkthrough!

  1. Place a program on your shooter ship with this code inside it
  2. Run the code with argument "fire" when you want to fire a missile
    • This argument can be attached to the ship toolbar or to timers if you wish
  3. Run the code with argument "kill" to kill guidance on all active missiles
    • This argument can be attached to the ship toolbar or to timers if you wish
  4. There is no step 4...


I hope this code makes missile firing much easier! :D Report any bugs that you find and I'll fix them ASAP!
178 Comments
Whiplash141  [author] 25 May, 2020 @ 11:26am 
This code has officially been retired and replaced by LAMP: https://sp.zhabite.com/sharedfiles/filedetails/?id=2108744940
Whiplash141  [author] 4 May, 2020 @ 10:09am 
"Shooter Ship Setup" in the missile code instructions covers it. And relatively soon
Litra 4 May, 2020 @ 9:32am 
how to that.
its is easy to use turret to steer the missile then move the ship.
how long to the new script is up??
tnx for the help. :D
Whiplash141  [author] 3 May, 2020 @ 1:51pm 
This script does not lock on, but the direction of a specified turret can be used to steer the missile.

I have a new script in development that will support actual homing, and this script will be retired.
Litra 3 May, 2020 @ 1:49pm 
hei can the script use turret to guide missile???
Whiplash141  [author] 28 Apr, 2020 @ 4:02pm 
(2/2)

3) You need to make an assumption about the missile merge/connector/rotor's position relative to the missile's programmable block to determine how to detach the missile. Most scripts that operate in the way you describe use the one closest to the program. Now what happens if the closest merge/connector/rotor to your programmable block ISN'T the correct one?

4) If I fire the furthest/closest missile, what if I want a specific firing pattern?

I'm not in the business of making code guess a user's intentions, nor do I wish to impose design limitations upon how users build missiles any more than I need to. I'd much rather have the user explicitly state how they want missiles to be handled so that the code simply does what you tell it to.
Whiplash141  [author] 28 Apr, 2020 @ 4:02pm 
(1/2)

"im surprised theres not some function that allows just firing of the nearest missile regardless of name"

The behavior of that is not user intuitive, repeatable, nor easy to troubleshoot. To support this, this would require multiple assumptions/edge case handling that I am not going to make.

1) If 2 missiles are the same distance from the measurement point, which fires first? How do you do it in such a way that it is repeatable and intuitive to the user taking into account floating point errors caused by mounting missiles on subgrids?

2) If missiles don't have any sort of identification of their blocks that means that you need to detach it from the firing ship before fetching blocks, otherwise you grab blocks you don't mean to (what you experienced). How, then, would I ensure all a missile's power blocks are enabled before detaching if there is nothing to identify which power systems belong to which missile?
Jaeger 28 Apr, 2020 @ 11:38am 
im surprised theres not some function that allows just firing of the nearest missile regardless of name like in guidance's launch script that i used long ago.
Whiplash141  [author] 28 Apr, 2020 @ 9:03am 
"cant get it to launch ONE AT A TIME. i named each prgram block on each missile custom data 01 02 etc but no luck wasted 6 hours so far"

As stated in the instructions for the missile script, you need to change both the name of the blocks on the missile AND the custom data to match. If all missiles are named the same thing, they will all fire at the same time.
Ghost 28 Apr, 2020 @ 4:37am 
There's a BP on the WS for a missile defense vehicle. Not sure of the name right off but it was a showcase vehicle for this script. I would suggest taking a look at it and see what's different. I don't remember how to do this off hand but it's a place to start.