Space Engineers

Space Engineers

View Stats:
How to make my drone follow a moving target
I'm trying to make a sabotage drone that attaches to any nearby antennas and detonates, but I can only make it fly to a set position. How do I make my drone fly to a moving position (like a moving ship?)
< >
Showing 1-4 of 4 comments
Oneill_SFA Jan 2, 2018 @ 7:35pm 
you have to either use a script(iffy, but workable depending on the script) or use the old gyro override+ sensor trick along with a timer or two to control the landing gear; assuming that's how you're trying to get them to attach. Thats too complicated to really explain in short, so look up a youtube video about drones and I'm sure something will come up that will help you. a lot of old school players have been doing this for years. In all, its not really an easy thing to do but its worth it in the end. You;ll want a sensor mod that extends the range though if you want it to be really useful as 50m doesn't give you much in the way of tracking abilities.

Jaunty Osprey Jan 2, 2018 @ 7:41pm 
I got some missiles to do a similar thing using a camera, programmable blocks, remote control, and laser antennas.

Disclaimer, I haven't tested them on moving targets, the project is still in it's infancy.

The camera's have a raycast function (that I don't fully understand myself) and you can program them to give the gps coords of a ship it's pointed at. The GPS coords are updated every so often (depends on the range) so you can track a target by following it with a camera.

You can send these coords to a missile or drone with laser antennas (I think there's a way with regular antennas too, not sure). When you assign a programmable block to an antenna, it runs when it recieves a message, with the message as the argument. Use the programmble block to to the message into GPS coordinates, and put these coordinates in your autopilot.

It turned out not to be super complex to code either.

I used this example for the raycasting:
https://forum.keenswh.com/threads/new-camera-raycast-and-sensor-api-update-01-162-dev.7389290/

And this link explains the laser antennas:
https://forum.keenswh.com/threads/programmable-block-inter-grid-communication-guide.7392031/

There's also probably scripts in the workshop made by more competent coders than I.
Wormling59mep Jan 3, 2018 @ 11:52am 
http://steamcommunity.com/sharedfiles/filedetails/?id=383152649&searchtext=tracking I'm going to see if this works, but it looks like it might. All I need to do is get close enough with a sensor.
Oneill_SFA Jan 3, 2018 @ 12:08pm 
Originally posted by Wormling59mep:
http://steamcommunity.com/sharedfiles/filedetails/?id=383152649&searchtext=tracking I'm going to see if this works, but it looks like it might. All I need to do is get close enough with a sensor.

that was broken a long time ago. Make sure to check both how recently a mod/script has been updated as well as the comments on the mod/script's page to make sure you're not spinning your wheels.

That used a function that is no longer available to players.
Last edited by Oneill_SFA; Jan 3, 2018 @ 12:08pm
< >
Showing 1-4 of 4 comments
Per page: 1530 50

Date Posted: Jan 2, 2018 @ 4:41pm
Posts: 4