Space Engineers

Space Engineers

Rdav's Guided Missile Script
1,235 Comments
Spanker Sep 1 @ 5:09am 
Thanks Rdav ! always having fun with your evil scripts :D
Here is my contribution to your work. Thanks !
https://steamcommunity.com/sharedfiles/filedetails/?id=3322322307&searchtext=
Natilus Aug 28 @ 6:13pm 
Hey @Rdav can you make this script compatible with Custom Turret controllers pleaaaseee
Rdav  [author] Aug 7 @ 10:47am 
its strange its defaulting to picking this even after disconnection and recompilation, you can add a 'nouse' tag to the custom data of a block and the script will ignore it, this is probably the way to go
Ignignokt Aug 7 @ 6:45am 
HI again, love the script, been doing all kinds of building with it, im only running into 1 problem with it now and its after the firing delay the missile turns right around and straight back towards the firing point, and i know exactly why its happening, i have a drone attached to the rear of my ship with a RC facing the way the missile is going after launch (no real other way to attach it to the ship BUT to the rear), i fix it easily by just unlocking it and locking again, but every time it recompiled through a reload of the save or manually it goes straight back to using the rear facing RC on the drone. point being is there any real way to specify ONE RC/seat to use rather then just the first one it finds? or posting a pin to the answer if already addressed? Thanks for the help in advance!
{H.K.}Warlama Aug 3 @ 10:04am 
well i will hope against hope!
Rdav  [author] Aug 2 @ 12:00pm 
sadly I think it was an intentional change made in order to reduce network traffic, so I don;t think it will be reverted
{H.K.}Warlama Aug 1 @ 4:30pm 
i hope that gets fixed at some point, cause id love to be able to hear it. it would help greatly
Rdav  [author] Aug 1 @ 1:20pm 
the way it does the warning screech is is turns on the audio loop plays it then toggles it on and off rapidly to give a warning tone noise,
I believe keen may have changed some of the behaviour so it messed with the timing and sometimes you can't hear the warning lock on noise now
{H.K.}Warlama Jul 31 @ 4:32am 
well im back, and i have a question. i have now sorted everything out, and my missles fire successfully at stationary targets, moving targets coming soon. but my question is about the sound block. i attached one and renamed it #A# and recompiled the PB. but i have noticed i cant hear anything from it despite me turning up the volume and range to max. the sound block also seems to switch itself off sometimes when the target turret is not on, or when not targeting an enemy. is this supposed to happen?
{H.K.}Warlama Jul 29 @ 2:47pm 
thank you for helping me with this. this script is too awesome to not have working for me. i appreciate it. if i have further issues or questions i will be sure to hit you up
Rdav  [author] Jul 29 @ 1:43pm 
no, the turret needs to be tracking a target
if it is doing this, it will normally be shooting, it should also work if the turret is actively tracking but not firing too, but the best debugging indicator its correctly tracking is the turret firing
{H.K.}Warlama Jul 29 @ 1:37pm 
so its correct if the turret IS shooting? is it not supposed to simply track without firing?
Rdav  [author] Jul 29 @ 1:14pm 
the turret should be shooting the target
if its not shooting the target then the script won't see it as 'tracking' an enemy
{H.K.}Warlama Jul 29 @ 11:25am 
alo something to note, for what ever reason, when i launch the missles, my launching ship just falls out of the air, as if you hit the off button. the ship has more than enough thrusters to keep itself aloft, no idea why this is happening
{H.K.}Warlama Jul 29 @ 11:16am 
i have tried setting this all up in a new world with no available DLC, the tracking turret in question opens fire on the enemy target no matter what turret i use, no matter if i block off the turret, or renaming it, or recompiling the PB.
{H.K.}Warlama Jul 29 @ 10:57am 
i have also uninstalled ALL DLC to see if that can clear anything up, will let you know my finding
{H.K.}Warlama Jul 29 @ 10:49am 
i tried to encase the turret with armor blocks to keep it from firing, and it just shoots through regardless.
{H.K.}Warlama Jul 29 @ 10:48am 
i went into my world, i looked for any DLC blocks but couldnt find any. could you tell me what blocks they are? i also replaced the turret with a different one, named it #A# and recompiled the PB. the turret immediately opened fire on my target. i made to sure to enable target stations, but it makes no point as the turret just fires at the target no matter what i do.
{H.K.}Warlama Jul 29 @ 9:50am 
the launching ship was made in that world, it was not ported over from another world. you said the turret was bugged, how did you fix it? did you replace it with a different turret? if so which one? i will go into my version of the world and try to apply the fixes and let you know what happens/
Rdav  [author] Jul 29 @ 7:13am 
also you can get more endurance out of testing worlds by disabling damage while troubleshooting these things, means you don;t need to continually replace your target!
Rdav  [author] Jul 29 @ 7:12am 
oh you had target stations off on the turrets, and your target was a station grid, turned that on and it immediately worked in your test world
Rdav  [author] Jul 29 @ 7:08am 
okay I took a look

There is something wrong with the turrets you have on those ships,
They are bugged, and they are refusing to target enemy blocks, even with a clear shot
was the blueprint of your launching ship made in a modded world perchance?

I fixed it in my own world by:
replacing dlc blocks with vanilla
replacing the turret, renaming turret to #A#
recompiling pb

the missiles then worked tracked and hit fine
Rdav  [author] Jul 29 @ 6:50am 
I'll take a look now
{H.K.}Warlama Jul 29 @ 6:41am 
https://steamcommunity.com/sharedfiles/filedetails/?id=3299139760

here is the link, i wish you luck on trying to solve this, as at this point im about ready to pipebomb my own mailbox out of frustration.
{H.K.}Warlama Jul 29 @ 6:13am 
roger that, i will link you when its ready
Rdav  [author] Jul 29 @ 2:13am 
The MIG is likely a little outdated, something with supergidding doesn't quite sit right these days,

I would say definitely test in an unmodded world, if you wanted to upload your unmodded world where they are not working, unlisted to the workshop, and give me a link I could take a look,

My initial guess is possibly ownership related issues, but often you'll find that when trying to debug these things you start changing stuff and accidentally start compounding problems together, it can be quite frustrating, either way, if you try it in an unmodded world, get as far as you can then upload and send me a link I should be able to take a look,
{H.K.}Warlama Jul 28 @ 6:27pm 
I have started a new world. no mods. i have enabled supergridding option. i downloaded the mig aircraft and took it apart to get hold of your interior turret. i placed it on my vessel. i double checked all settings and looked over the PB to make sure there are no errors.I built missles identical to the ones on the mig. i attached them to my ship. at this point, the turret from the mig fires on my target im using to test, the missles no longer fire at all.
{H.K.}Warlama Jul 28 @ 2:11pm 
The list of mods i have in my world are as follows:
The ore scanner. (Ore detector)
TBH - Industrial Batteries
Paint gun - realistic painting for survival + special creative
Build Info
Control module - Basically key binding for ships
High torque rotors
(OBSOLETE) THRUSTER FORCE MAGNITUDE X 1000 replacement
Q-tech utilities 3.3
Rdav  [author] Jul 28 @ 9:16am 
If the turret is not tracking the target that does mean there is something else wrong here, any mods at all in the world?
The missiles will never lock on unless the turret is actively tracking the target, as if it is not tracking the target the script cannot see that it is 'tracking' a target, and thus use that for guidance
{H.K.}Warlama Jul 27 @ 1:20pm 
for whatever reason, the turret wont track the target at all now, when it did it would just shoot the target. i really have run out of ideas on what to try to fix it. i have a sound block, but it wont make a sound.at this point i think im more out of patience than anything else. if anyone has any idea please let me know
{H.K.}Warlama Jul 27 @ 10:42am 
Hello, im loving the idea of this script. i have been sitting here for 2 days trying to get this to work. my missles will fire from my ship but they just fuck off into the distance, the PB gives me no errors or issues at all. i have named everything #A# i have placed lateral thrusters on my missles as im testing on a planet. i have placed the current weight of the missles in the custom data field of the gyro. (you say the weight of the missle is in Kg in the Info tab. im given just a number under grid mass. 8397) i have the tracking turret on my ship, and its following my targets on its own and its named #A# i also do not have WC installed i have read through everything i can find in hope of solving this. but at this point its looking rather hopeless. is there anything i missed? or anything you can suggest? please and thank you.
Ignignokt Jul 21 @ 8:53am 
needed to recompile 'after' adding the new tag, thanks!!
Rdav  [author] Jul 21 @ 1:04am 
you'd need a new tag for each side
Ignignokt Jul 20 @ 8:52pm 
Is "only' 1 turret with the tag compatible? im trying to set up a 2 sided setup but its only really using one turret with the tag rather than the 2 with the same tag when on both sides
.
Lazlo Jul 20 @ 5:33pm 
ah good point.. i forgot about that.. sorry i will try again
thank you
Rdav  [author] Jul 20 @ 2:36pm 
running any mods?
Lazlo Jul 19 @ 5:34pm 
it is amazing script.. i cannoy get it to work myself because i am a skill issue.. it just goes up and foreward and wont lock on i gues.. no clue..
[BR]SharkStrike Jul 7 @ 12:16am 
Any chance of an update, so it works with the 1x1x1 small grid connectors, and turret spotlight?
Burnt Eggs Jun 12 @ 6:42pm 
how do you use the rayscanning stuff
Star_Kindler Jun 3 @ 10:25am 
@Rdav very late response as I think Steam forgot to notify me, but unfortunately that did not fix it for my btw. They will still use dampeners or something even while supposed to be going in a straight line. The only way I managed to fix it was by removing all side thrusters, so that they only have forward thrust.
Kheryn May 22 @ 2:54am 
Would it be possible to repurpose this scripts "launch one at a time by running the command" feature for unguided bombs by naming the merge block on the bomb #A#?
Rdav  [author] Apr 7 @ 4:16am 
it just works
DeltaWing Apr 6 @ 6:07pm 
Not even a workaround needed? It just works?
Rdav  [author] Apr 6 @ 4:40pm 
reference them in the pb before they leave the grid and you can maintain a connection to them

@Star_Kindler
in the script increase the 'launch distance' parameter, this will make them fire the thrusters in a straight line for a longer distance before performing any turning manoeuvres
DeltaWing Mar 18 @ 5:37pm 
How do you access blocks from the PB that aren'tpart of the same grid anymore?
Star_Kindler Mar 14 @ 4:55pm 
I guess I'll post this here as well as it doesn't look like the discussion is being used anymore,

My missiles launch perfectly when my ship isn't moving, but if it's drifting at even 18 m/s (I'm not accelerating at all), then the missiles crash into the inside of my ship and explode instead of launching out the bay. How do I fix this? If it is not possible to fix with this script, is there another with this capability that someone can recommend?

Thank you very much in advance!
Rdav  [author] Mar 10 @ 12:10am 
Depends on what mods, anything that uses any weaponcore or weaponcore shields variant will break any weapon scripts, most cosmetic mods are fine
TAB Mar 7 @ 11:07pm 
Like a lot, didn't think they could really interfere with script :(
Rdav  [author] Mar 7 @ 10:07am 
running any mods?
TAB Mar 6 @ 7:57am 
I can get it working, solved all displayed problems, but when I get into range it doesnt make beeping sound and when I fire it it just aims straight. Do you know what could be the problem?