Space Engineers

Space Engineers

[RETIRED] Whip's Missile Launch Script
178 条留言
Whiplash141  [作者] 2020 年 5 月 25 日 上午 11:26 
This code has officially been retired and replaced by LAMP: https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2108744940
Whiplash141  [作者] 2020 年 5 月 4 日 上午 10:09 
"Shooter Ship Setup" in the missile code instructions covers it. And relatively soon
Litra 2020 年 5 月 4 日 上午 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  [作者] 2020 年 5 月 3 日 下午 1: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 2020 年 5 月 3 日 下午 1:49 
hei can the script use turret to guide missile???
Whiplash141  [作者] 2020 年 4 月 28 日 下午 4: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  [作者] 2020 年 4 月 28 日 下午 4: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 2020 年 4 月 28 日 上午 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  [作者] 2020 年 4 月 28 日 上午 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 2020 年 4 月 28 日 上午 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 2020 年 4 月 28 日 上午 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 2020 年 1 月 9 日 下午 1:27 
ok figured it out it is case sensitive
Calendir 2020 年 1 月 9 日 下午 1:18 
well i actually have it named but its still not working
Calendir 2020 年 1 月 9 日 下午 1:07 
oh.... thank you much appreciated
Whiplash141  [作者] 2020 年 1 月 9 日 上午 5:32 
Well that means there are no programs with "Missile" in their name
Calendir 2020 年 1 月 9 日 上午 12:46 
whenever i press run with the argument fire it says no untriggered missile programs were found...
Calendir 2020 年 1 月 8 日 下午 11: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  [作者] 2019 年 9 月 25 日 下午 9:12 
Awesome, good to hear it. Also, the missile code no longer needs a timer, so you can save a block of space
mobisam 2019 年 9 月 25 日 上午 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  [作者] 2019 年 9 月 25 日 上午 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  [作者] 2019 年 9 月 25 日 上午 5:46 
@Captein: You could make a timer block that runs the program with the fire argument 2 times
mobisam 2019 年 9 月 25 日 上午 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

Rodrigo 2019 年 7 月 20 日 下午 1:30 
Is it possible for this script to launch both "Missile 1" and "Missile 2" with a single fire run?
Natomic 2019 年 7 月 15 日 上午 7:02 
sorry had to go away and forgot to check the page. Link to ship https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1799195691
Whiplash141  [作者] 2019 年 7 月 10 日 下午 2:58 
Workshop link is most convenient. You can just leave it here and I'll take a peek.
Natomic 2019 年 7 月 10 日 上午 8:19 
sure how do you want me to get it to you?
Whiplash141  [作者] 2019 年 7 月 10 日 上午 7:36 
Do you have a blueprint/world I can look at?
Natomic 2019 年 7 月 10 日 上午 6:43 
just double checked, everything has ownership set to me still not working
Whiplash141  [作者] 2019 年 7 月 9 日 下午 8:20 
Nope
GOMERSGOOD 2019 年 7 月 9 日 下午 8: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  [作者] 2019 年 7 月 8 日 下午 10:02 
No
GOMERSGOOD 2019 年 7 月 8 日 下午 9:43 
sorry i think i figured it out, im trying to use your script on the torpedo blocks, is this possible?
GOMERSGOOD 2019 年 7 月 8 日 下午 7:09 
that and imnow noticing i dont have the same script read out as in your video was there and update?
GOMERSGOOD 2019 年 7 月 8 日 下午 6: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 2019 年 7 月 8 日 下午 6: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  [作者] 2019 年 7 月 8 日 下午 3:00 
Check ownership on the firing program
Natomic 2019 年 7 月 8 日 上午 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  [作者] 2019 年 5 月 17 日 下午 10: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 2019 年 5 月 17 日 下午 10: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 2019 年 4 月 24 日 上午 9:38 
Yeah, found it, ty :)
Is there a chance to join the Whiplash Mil. Industry? :D
Whiplash141  [作者] 2019 年 4 月 24 日 上午 8:44 
It's not a mod, it's a script. Place w programmable block, click edit, then click the workshop button
drMuesli 2019 年 4 月 24 日 上午 7:42 
Hi, i don't see the script in my F10 or Mods menu
Whiplash141  [作者] 2019 年 4 月 13 日 下午 5:36 
My Komodo Mk 1 :)
Atro 2019 年 4 月 13 日 下午 2:36 
Do you have any workshop items using the script
Atro 2019 年 4 月 13 日 下午 2:36 
Yessss
Whiplash141  [作者] 2019 年 4 月 12 日 下午 4:28 
Theoretically infinite, but you kinda need to be able to see the target since these are optically guided
Atro 2019 年 4 月 12 日 下午 2:35 
can you tell us the range of the missiles
BenDoesThings 2019 年 2 月 2 日 下午 2: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 2019 年 2 月 2 日 下午 2:08 
wait, so do you need to change the settings in the custom data and not in the script itself?
BenDoesThings 2019 年 2 月 2 日 下午 2:05 
i do, with the ship and missiles