Space Engineers

Space Engineers

Easy Lidar Homing Script
859 Comments
HydraDominatus Apr 28 @ 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 Apr 23 @ 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 Apr 21 @ 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 May 22, 2024 @ 8:37pm 
distance=2
dmsrange=5
failunsafe=true
failasgroup=true
FreezingPanzer Jul 18, 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 May 9, 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 Sep 17, 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 Aug 15, 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 Jun 21, 2022 @ 5:41pm 
never mind I found the problem. I had some old override in custom data field for the cameras
Boldtaar Jun 21, 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 Apr 11, 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 Mar 8, 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 Feb 13, 2022 @ 4:01pm 
Still the best missile script for me in '22
Foxtrot Unit Jan 6, 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://steamcommunity.com/sharedfiles/filedetails/?id=2709980236 Hope you like it :)
Mainframe Nov 10, 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 Nov 1, 2021 @ 12:37am 
quick question does the script utilize cameras facing different directions on the launch vehicle?
ClassyCat Mar 23, 2021 @ 2:49am 
NVM, got it working with the Vertical takeoff, by turning the RC upside down
ClassyCat Mar 23, 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 Mar 17, 2021 @ 1:23am 
Is there any difference between this script and Whiplash's homing guided missile script?
Zen Dec 11, 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 Nov 27, 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 Nov 26, 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 Nov 3, 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 Oct 30, 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 Oct 30, 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 Oct 25, 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 Sep 23, 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 Sep 16, 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 Sep 16, 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 Aug 24, 2020 @ 9:01pm 
Alysius, is it possible to have the R_Designator on a separate grid to the Missiles?
Lekson Aug 23, 2020 @ 5:02pm 
how far can a rocket be launched?
alucard Aug 17, 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] Aug 17, 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 Aug 16, 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 Aug 16, 2020 @ 12:00pm 
figured it out 1 small battery was not strong enough to power it
JDawg Aug 16, 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] Aug 16, 2020 @ 4:37am 
yes it works this way. but you can only tag one turret
alucard Aug 16, 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] Aug 15, 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 Aug 15, 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 Aug 15, 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 Aug 15, 2020 @ 8:52am 
no no mods just this one
Alysius  [author] Aug 15, 2020 @ 8:00am 
that is weird, are u using some mods?
JDawg Aug 14, 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] Aug 14, 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 Aug 7, 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] Jul 27, 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 Jul 26, 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] Jul 10, 2020 @ 6:15am 
the guide has detailed setup steps for rotors too
Dominator1559 Jul 10, 2020 @ 5:18am 
how to launch using rotor connection? anything specific?