Space Engineers

Space Engineers

[RETIRED] Whip's Missile Launch Script
178 kommentarer
Whiplash141  [ophavsmand] 25. maj 2020 kl. 11:26 
This code has officially been retired and replaced by LAMP: https://steamproxy.com/sharedfiles/filedetails/?id=2108744940
Whiplash141  [ophavsmand] 4. maj 2020 kl. 10:09 
"Shooter Ship Setup" in the missile code instructions covers it. And relatively soon
Litra 4. maj 2020 kl. 9:32 
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  [ophavsmand] 3. maj 2020 kl. 13:51 
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. maj 2020 kl. 13:49 
hei can the script use turret to guide missile???
Whiplash141  [ophavsmand] 28. apr. 2020 kl. 16:02 
(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  [ophavsmand] 28. apr. 2020 kl. 16:02 
(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 kl. 11:38 
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  [ophavsmand] 28. apr. 2020 kl. 9:03 
"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 kl. 4:37 
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.
Jaeger 28. apr. 2020 kl. 3:44 
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
Calendir 9. jan. 2020 kl. 13:27 
ok figured it out it is case sensitive
Calendir 9. jan. 2020 kl. 13:18 
well i actually have it named but its still not working
Calendir 9. jan. 2020 kl. 13:07 
oh.... thank you much appreciated
Whiplash141  [ophavsmand] 9. jan. 2020 kl. 5:32 
Well that means there are no programs with "Missile" in their name
Calendir 9. jan. 2020 kl. 0:46 
whenever i press run with the argument fire it says no untriggered missile programs were found...
Calendir 8. jan. 2020 kl. 23:03 
hi um the missile launch script is not working for me yet i can manually trigger the missile it self and works i also have the latest update
Whiplash141  [ophavsmand] 25. sep. 2019 kl. 21:12 
Awesome, good to hear it. Also, the missile code no longer needs a timer, so you can save a block of space
mobisam 25. sep. 2019 kl. 7:00 
@Whiplash141
OOPS! - Missile now running Optical Guidance System v62-18. Must watch the videos more closely.

When I Run the missile code with the 'Setup' argument I get the [OPTIONAL] warnings but also:

[FAILED] No main thrusters found - the forward thruster on the missile is named 'Main Thruster Missile 1'

I had placed the 'shooter reference' on the cockpit rather than the remote control so that was a noob error.

Thanks for the assist (from Oz)
Whiplash141  [ophavsmand] 25. sep. 2019 kl. 5:50 
@mobisam: the missile needs to be running the missile code, not this launch code. If it is in fact using the missile code, what version is it?
Whiplash141  [ophavsmand] 25. sep. 2019 kl. 5:46 
@Captein: You could make a timer block that runs the program with the fire argument 2 times
mobisam 25. sep. 2019 kl. 2:51 
HELP!! Missile will not fire.
I have battery, gyro, thruster, merge block, progblock, remote and timer all with 'missile 1' as part of their names.
The timer is set to trigger now/start/run the progblock with a 'fire' argument.
Missile progblock and craft with 'shooter reference' in its name both running rev 8.2 1/5/19 of Whip's Missile Fire Script
All blocks belong to 'Me'
When I 'Fire' the launch progblock reports"
WMI Missile Fire System
Triggered program named:
'Progblock Missile Launch'
Nothing reported via the missile 1 progblock

I also have the missile launch progblock stating 'No untriggered missile programs were found'

I thought I had followed the video but obviously there is an issue between the video and my eyes.

Thanks for your excellent work on this as the pirates are winning on my world

O_cara_do_sitio 20. juli 2019 kl. 13:30 
Is it possible for this script to launch both "Missile 1" and "Missile 2" with a single fire run?
Natomic 15. juli 2019 kl. 7:02 
sorry had to go away and forgot to check the page. Link to ship https://steamproxy.com/sharedfiles/filedetails/?id=1799195691
Whiplash141  [ophavsmand] 10. juli 2019 kl. 14:58 
Workshop link is most convenient. You can just leave it here and I'll take a peek.
Natomic 10. juli 2019 kl. 8:19 
sure how do you want me to get it to you?
Whiplash141  [ophavsmand] 10. juli 2019 kl. 7:36 
Do you have a blueprint/world I can look at?
Natomic 10. juli 2019 kl. 6:43 
just double checked, everything has ownership set to me still not working
Whiplash141  [ophavsmand] 9. juli 2019 kl. 20:20 
Nope
GOMERSGOOD 9. juli 2019 kl. 20:20 
is there any script you DO have that can accomplish the same task?
trying to use the programmable block on my ship to launch torpedo block missiles via GUIDANCE block. i have them set to rebuild and when they rebuild they get grayed out of the toolbar.
is there any way i can edit this to fend the signal to the GUIDANCE block instead?
Whiplash141  [ophavsmand] 8. juli 2019 kl. 22:02 
No
GOMERSGOOD 8. juli 2019 kl. 21:43 
sorry i think i figured it out, im trying to use your script on the torpedo blocks, is this possible?
GOMERSGOOD 8. juli 2019 kl. 19:09 
that and imnow noticing i dont have the same script read out as in your video was there and update?
GOMERSGOOD 8. juli 2019 kl. 18:51 
side note, missile wont fire when i run the fire argument in PB
just sits there
i usually use the guidance block to launch or lock missiles on to target? is that whats fucking me over?
GOMERSGOOD 8. juli 2019 kl. 18:44 
cant get the missile to fire, do i have to use something other than the HARDPOINT that comes in the torpedo blocks?
i got the program to run just fine, says it launches missiles, but they don't release?
Whiplash141  [ophavsmand] 8. juli 2019 kl. 15:00 
Check ownership on the firing program
Natomic 8. juli 2019 kl. 9:06 
Um i have a slight problem. When i try and run this with the fire argument it says "no untriggered missile programs" but i have two missile sitting in their silos. The missiles work fine and they fire when i activate them from their command blocks "manually" but the problem is the silos weld more missiles once they fire so that more can be fired. So without this script i have to add the programable blocks back to the hotbar every time i want to fire. Also when i fire the missiles and then use the "kill" argument on this script it says it killed guidence on 0 missiles. Help
Whiplash141  [ophavsmand] 17. maj 2019 kl. 22:28 
That ship is sadly broken due to API changes. I have a new one in the works which is why I haven't bothered going back to fix the old one.
Tricky Ricky 17. maj 2019 kl. 22:07 
man i been trying to shoot a missile out of the Komodo for days now i feel pretty stupid so do i need to load this script into it? cause i see the Komodo already has it in it but when i press 1 for fire just the alarm goes off and no misssiles shoot pleaseeeee some one help im really new tot his game and i really wanna learn how these missiles work and shoot them
drMuesli 24. apr. 2019 kl. 9:38 
Yeah, found it, ty :)
Is there a chance to join the Whiplash Mil. Industry? :D
Whiplash141  [ophavsmand] 24. apr. 2019 kl. 8:44 
It's not a mod, it's a script. Place w programmable block, click edit, then click the workshop button
drMuesli 24. apr. 2019 kl. 7:42 
Hi, i don't see the script in my F10 or Mods menu
Whiplash141  [ophavsmand] 13. apr. 2019 kl. 17:36 
My Komodo Mk 1 :)
Atro 13. apr. 2019 kl. 14:36 
Do you have any workshop items using the script
Atro 13. apr. 2019 kl. 14:36 
Yessss
Whiplash141  [ophavsmand] 12. apr. 2019 kl. 16:28 
Theoretically infinite, but you kinda need to be able to see the target since these are optically guided
Atro 12. apr. 2019 kl. 14:35 
can you tell us the range of the missiles
BenDoesThings 2. feb. 2019 kl. 14:14 
sorry i am an idiot, i did not read the description, i only watched the video, i have figure it out, sorry for taking up your time
:(
BenDoesThings 2. feb. 2019 kl. 14:08 
wait, so do you need to change the settings in the custom data and not in the script itself?
BenDoesThings 2. feb. 2019 kl. 14:05 
i do, with the ship and missiles