Space Engineers

Space Engineers

Easy Lidar Homing Script
859 Comments
HydraDominatus 28 Apr @ 12:38pm 
does anyone know how to change script so it works in situation where missile is already detached? I made it so missile runs it's PB after detachment through event controller so I can launch missiles without adding them to hotbar
Bumongus 23 Apr @ 7:03am 
Best bet is to take a look and see how it groups thrusters I guess... :\
It should say in the comments somewhere how it works
WardenWolf 21 Apr @ 7:40pm 
So, running into a problem. The missile keeps misidentifying the gravity dampening thrusters as the main thrust (instead of automatically selecting based on R_FORWARD which would make sense). Your setup guide mentions correcting such automatic selections but doesn't say how.
DUBwithCHEESE 22 May, 2024 @ 8:37pm 
distance=2
dmsrange=5
failunsafe=true
failasgroup=true
FreezingPanzer 18 Jul, 2023 @ 9:10pm 
can anybody provide me what to put into the camera custom data that allows me to do the following.

the missile will be in launch bay with all warheads NOT armed. once launched it will arm it self when the missile is within 60 meters of the target.

i understand that a extra block sensor can also do the job, but i would like to do the job with the scripts custom settings.
EndoMatrixHD 9 May, 2023 @ 4:27am 
is it normal to not get any Lock-on sound before i shot the missile? everytime the sound yust comes aftherwards, so i dont know when it is locked on?
Plongo 17 Sep, 2022 @ 6:48pm 
Hey @Alysius do you think you could update the script so it can run the custom turret controller &/or search light as the R_DESIGNATOR? Cheers
Daxter 15 Aug, 2022 @ 7:51am 
Hello. Could you add me as a friend? I wanted to talk about a new project.. I hope you can help..
Boldtaar 21 Jun, 2022 @ 5:41pm 
never mind I found the problem. I had some old override in custom data field for the cameras
Boldtaar 21 Jun, 2022 @ 3:23pm 
Not used this script in a while is still working?
Having problem with proximity fuse and Dead Man's Switch not detonating my Warheads
Borimino 11 Apr, 2022 @ 8:45am 
@Mainframe I am having the same problem. Turret-guided (mode 3) works fine, but the lidar-modes don't seem to work at all. It just flies upwards.

It also never triggers the sound block.

When inspecting the programmable block while in flight, it outputs the following:
ST:0:0:0:2251:K:-442134.47556:-137283.68227:954798.63264:0:

The first non-zero number increases as the missile flies upwards, but the other numbers stay the same. None of the numbers correlate with the location of my base.
Tomahawk 8 Mar, 2022 @ 4:59pm 
Whenever i build my missile and press launch, it just fires the engines but doesnt actually leave the launch pad, I made sure to have the correct connector selected as well. any ideas?
Deserter 13 Feb, 2022 @ 4:01pm 
Still the best missile script for me in '22
Foxtrot Unit 6 Jan, 2022 @ 7:39am 
Hi, I just recently used this script in my Jerricho Cluster warhead.
I noted you as a author of this script in thanks (in description on steam workshop)
Also made a cool action trailer for it, where I also mantioned you as the script author.
I hope that's ok ? Check it out here: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2709980236 Hope you like it :)
Mainframe 10 Nov, 2021 @ 11:52am 
after hours of messing around i can't get lidar to work. It will just fly in a straight line and never lock to a target. The camera guided and gps mode work, but never a lock.
Femboi 1 Nov, 2021 @ 12:37am 
quick question does the script utilize cameras facing different directions on the launch vehicle?
ClassyCat 23 Mar, 2021 @ 2:49am 
NVM, got it working with the Vertical takeoff, by turning the RC upside down
ClassyCat 23 Mar, 2021 @ 1:58am 
Can I make the script wait 1-2 seconds before the missile activates thrusters? I'm making an atmospheric ship with a "Bombing bay", so I need the missiles to fall before turning on their thrusters.
TheBlackFox 17 Mar, 2021 @ 1:23am 
Is there any difference between this script and Whiplash's homing guided missile script?
Zen 11 Dec, 2020 @ 9:26pm 
@Dr. VaporKrab - i'm able to run a ton of these on a server with the PB overheating limiter running, with a per-player cap of 0.5ms. They don't do anything while idle unlike Whip's, so you should be fine. However. the DDS system is pretty heavy, so I would recommend using this in multiplayer-heavy situations.
Bumongus 27 Nov, 2020 @ 7:29pm 
Mr @Alysius I think new update broke this script, there is error all the time that says something about assembly not found please compile script.
Q 26 Nov, 2020 @ 9:30am 
what is the average runtime for these Alysius? Is this script able to run on the servers that have overheating PB's on it?
Deserter 3 Nov, 2020 @ 1:17pm 
There is a bug: missile commands are called only once, there is no cycle in the code. Let's say if the missile was close to the target, then far and then close again, the commands will not be executed a second time
Ghostwheel 30 Oct, 2020 @ 7:36pm 
<CONT>I'm understanding correctly that I don't need a camera, remote control or antenna on my missile with 7, right? I assume the camera passes the target info to the turret which the missile uses to designate its target. Kind of like RDAVs, minus the raycasting. Any chance you could explain what options I'd need to configure to get this basic setup working?
Ghostwheel 30 Oct, 2020 @ 7:36pm 
Hey @Alysius I've been using RDAVs missile guidance but want to switch to this. I'm launching a simple large block missile consisting of a Gyro, Warhead, Battery, Merge Block and Ion Thruster. I'd like to keep it that way so it looks like mode 7 is what I want. Launching from a simple ship using a merge block etc etc and no mods. I put 2+ cameras facing each direction on my ship (named them properly of course) and named a turret on my ship properly. I put a powered antenna 1km out in front of my ship and gave it to the space pirates. I do the recompile and run after setting the obvious, but no go. Looks like it's disconnecting the missile by disabling the merge block properly but not doing anything afterwards. <CONT>
Malacanth 25 Oct, 2020 @ 8:47pm 
Having the issue of tagging parts of the missile I tag them Main, and change the tag setting in the script, but for some reason when launched the missile detaches then kinda sits there and then spins out of control, the spin I think is because it is not reaching height and is proceeding to my deployment commands. when I remove the tags, the missile launches fine, but I really need the tags for this build.
alucard 23 Sep, 2020 @ 4:53pm 
I'm attempting to understand the "TGE" command and am having some difficulty.

My goal is to create a missile which will detonate once it travels more than 4km. The way the TGE command is written seems to imply that it's looking for a trigger command and will then execute a command in response, but do they have to be the same command? What's the best way to go about simply having the missile detonate upon X distance traveled?
Alebado 16 Sep, 2020 @ 2:49am 
Figured it out, spinAmount was f-ing me up, it was preventing torpedo to spin to target, when torpedo itself is not locked yet and is guided by F_LIDAR or F_FORWARD. Any workarounds to make it spin even if pointed at different direction ?
Alebado 16 Sep, 2020 @ 2:39am 
Can torpedoes fire if they placed backwards? Launcher ship has lidars and forward to target ship, but after launch torpedoes start spinning in spiral to direction where they are pointed, it happens in every launch mode 0-3
Plongo 24 Aug, 2020 @ 9:01pm 
Alysius, is it possible to have the R_Designator on a separate grid to the Missiles?
Lekson 23 Aug, 2020 @ 5:02pm 
how far can a rocket be launched?
alucard 17 Aug, 2020 @ 11:48am 
Odd; the modded block that has a 10k range has been working perfectly for a while, so I have no issues there. Things only break when I add another ai-controlled turret to the missile. Is there any way to tell the system "only use this designator for tracking to target", but to allow the other gun (again, on the missile) to track and fire on its own without impacting the missile flight path?
Alysius  [author] 17 Aug, 2020 @ 2:37am 
oh ya about modded turrets, there is issue with using that as designator cause the keen internal codes somehow f'up the return targeting info for any modded turrets with more than 800m range.
alucard 16 Aug, 2020 @ 4:14pm 
Thanks Alysius. I'm looking to have a missile with at least two ai turrets on it; one is a modded designator that can has a 10k range but does no damage, and another is much shorter range but does damage. Even when I mark the 10k turret as R_DESIGNATOR, the missile still doesn't home. Is there any way to make this work?
JDawg 16 Aug, 2020 @ 12:00pm 
figured it out 1 small battery was not strong enough to power it
JDawg 16 Aug, 2020 @ 11:49am 
i used 2 atmospheric thrusters and it seems like the warheads are just to heavy now with to use just 2 thrusters
Alysius  [author] 16 Aug, 2020 @ 4:37am 
yes it works this way. but you can only tag one turret
alucard 16 Aug, 2020 @ 1:16am 
With regard to using a turret on a missile, would simply adding the designator tag to one of the turrets work? Would the guns then target/shoot on their own, with the designator as the unit helping point to target?
Alysius  [author] 15 Aug, 2020 @ 11:48am 
any chance the thrusters are way too weak or u are using atmo thrusters in space (or vice versa, ion in atmosphere)
JDawg 15 Aug, 2020 @ 11:33am 
did they make the warheads really heavy? i took them off and it flies just fine now i put one warhead on with two engines and its so slow lol
JDawg 15 Aug, 2020 @ 9:04am 
when i hit run it just detaches and falls there is no flight. it has warheads atmospheric thrusters progam block wireless remote cameras small battery
JDawg 15 Aug, 2020 @ 8:52am 
no no mods just this one
Alysius  [author] 15 Aug, 2020 @ 8:00am 
that is weird, are u using some mods?
JDawg 14 Aug, 2020 @ 5:36pm 
i used this script before and it worked wonders now i cant figure out why when i launch mmissile it detaches and starts to turn to gps location but its like it has no thrust and will not fly upward i even made take off true
Alysius  [author] 14 Aug, 2020 @ 5:15am 
it gets the first turret it detects with the designator tag, so more than 1 means you won't know which one is being selected. currently no such support yet
alucard 7 Aug, 2020 @ 3:17am 
Is there a workaround for having multiple ai turrets on a missile, specifically the possibility of adding guns which would target an enemy as the missile gets close? As you've stated, it appears the missile does not home in on the target if more than one turret has been added.
Alysius  [author] 27 Jul, 2020 @ 11:21pm 
no cannot, this is out of ingame script scope. it will be considered cheat if it can do that. The API does not have a function to do that
FramedYannick 26 Jul, 2020 @ 2:42pm 
Hy, huge fan here!
I was wondering if it is possible to have the faction of the missile changed after launch to the target faction? Like this the missile would bypass all defensive measures and strike the target.
Alysius  [author] 10 Jul, 2020 @ 6:15am 
the guide has detailed setup steps for rotors too
Dominator1559 10 Jul, 2020 @ 5:18am 
how to launch using rotor connection? anything specific?