Space Engineers

Space Engineers

Khjin's Navigation Autopilot Script
33 Comments
Quickshadow10m 9 Apr, 2020 @ 7:29pm 
thx, you should rewrite the script, maybe add a function for turret tracking in covermode instead of senser, because I was able to use agility IN WALK MODE to get out of senser range at 35m height. I feel that this script has so much potential that is lost if you use 'Just the ingame autopilot', Maybe a system that uses raycast to avoid objects and to land safely even if there are objects near the pad to avoid. Some good scripts you could use for a refrence is PAM or SAMv2. I love especially PAM (As I have not tried SAMv2) because of the docking sequence alone. Untill next time, I hope you keep on trucking, you are a incredibly good scripter, with great potential to be up there next to Radv, Whiplash141, Kek.

-Quickshadow10m
Khjin  [author] 9 Apr, 2020 @ 7:06pm 
Hahaha sorry about that, I haven't done much about the script lately. I'm actually surprised it still works as AI seems to be a bit buggy for me. Anyways, you can connect to the ship remotely via antenna then run "covermode" on the PB and it will stop cover mode. Better yet, you can run "autolandmode" to have the ship land instead of it running from you. Hope this helps :steamhappy:
Quickshadow10m 8 Apr, 2020 @ 12:34pm 
Hey, is there a way I can stop it trying to cover me? I try to get back in the ship, but it just flies up farther away.
Khjin  [author] 13 Mar, 2020 @ 8:20am 
Cruise mode tries to keep the ship at a set speed forward, only firing thrusters when needed. You need to do the alignment manually. In a way, it saves fuel by using as little thrust as needed.
Booperius 11 Mar, 2020 @ 11:18pm 
Does cruisemode work on planets i.e does it constantly accelerate in a gravity well or does it let things "coast" to conserve fuel?
Khjin  [author] 6 Aug, 2019 @ 7:21am 
I'd love to but the blueprint I used in the screenshots got wiped when my old pc died :steamfacepalm:. I'll make a new ship instead and post it. :steamhappy:
TheFirstAnon 4 Aug, 2019 @ 3:59pm 
Could you upload the blueprints for the ship in the thumbnails?
Khjin  [author] 2 Aug, 2019 @ 11:29am 
@Najuel Hello! I'm good, just a bit busy in life. :D

Anyways, that is not really a problem. It's just the script calling some old code but it still works. I will update the script but not anytime soon. Tbh this script needs an overhaul at this point :steamfacepalm:
Najuel 29 Jul, 2019 @ 7:22pm 
Hi, how are you?, i get the following message:
Program(1026,57): Warning: 'IMiTextPanel.GetPublicText()' is obsolete: LCD public text is deprecated
Program(1028,58) Warning about IMyTextPanel.WritePublicText(string,bool) is obsolete
Program(1029,12) Warning about IMyTextPanel.ShowPublicTextOnScreen() is obsolete
Program(1026,57) Warning IMyTextPanel.Get PublicText() is obsolete
Program(1028,58) Warning IMyTextPanel.WrhitePublicText(...) is obsolete
Program(1029,12) Warning IMyTextPanel.ShowPublicTextOnScreen() is obsolete
Khjin  [author] 18 Jun, 2019 @ 8:44am 
@Nizzine Hello! It would be great if you can describe the problem a bit more. But if you want a quick fix, you can try and make sure all parts including the sensor and the text panel is added to the NAS group. Usually that's enough. :)
Nizzine 16 Jun, 2019 @ 6:16pm 
Gives me some exception. Would be awesome if this script would work.
Scooby Doo 22 Sep, 2018 @ 10:38am 
Oh come on Gaming is much more important then work. What gives? ROFL. I will keep an eye on this for the Follow.
Khjin  [author] 22 Sep, 2018 @ 6:29am 
I totally agree on static bases being a little bit boring unless you have an MP setup and a lot of players using it. :) Work has been holding me up on working on this script but follow mode is certainly a feature I will implement.
Scooby Doo 21 Sep, 2018 @ 1:14pm 
I would love to just have something where I can have say a battleship follow my Carrier around. This way I do not have to go into battle with my carrier/production ship and risk everything. Bases are so static and boring at times. LOL.
Khjin  [author] 17 Sep, 2018 @ 7:34am 
Thanks! I'm still working on that ship as I have been really busy IRL but will post it soon™. Also, I've been busy working on the script. The next update will bring new QOL features so stay tuned!
PhoenixSE 16 Sep, 2018 @ 2:20pm 
I want the Aircraft build also LOL, looks AWESOME!
Fool of Many Fandoms 24 Jul, 2018 @ 4:24pm 
can you make a feature to explore? or fly around a planet/space
BigBadSlayer 14 Jul, 2018 @ 2:12pm 
what you could do, which is what I want to use this script for. is to set the pin on a target, and have a small squad of ships with turrets go to it and fight (as a programmer myself, I understand that to make a ship able to dog fight on its own, you need a metric-shit-ton of professional progamming to make it do small stuff because we are working within a 3-d enviroment that normally doesnt support artificial inteligence)
Khjin  [author] 7 Jun, 2018 @ 9:06pm 
No, the script can't dog-fight. That would be an amazing feature for drones though. :)
Celestite 7 Jun, 2018 @ 6:38pm 
khjin can it dog fight?
Khjin  [author] 8 Apr, 2018 @ 10:13am 
Thanks, I'm glad you like it :)
MistyBitty 8 Apr, 2018 @ 9:52am 
Amazing!! well done kind sir.. =D
CTH2004 5 Apr, 2018 @ 1:40pm 
@Khjin Fair Enough! Can't wait for whatevers next!
Khjin  [author] 5 Apr, 2018 @ 6:56am 
@CTH2004 I built the script to avoid crashing and not otherwise. However, I won't say anything if you decide to strap your ship with a lot of warheads, cruisemode to your target, and detonate the warheads with a sensor. :D
Khjin  [author] 5 Apr, 2018 @ 6:55am 
@The Meanie So far I have no plans for an "attack" mode, maybe at most a missile dodge assist? Anyways, you can always chain the commands to get a similar effect. Example, you can build a drone with rockets pointing downard, use hovermode to get to target and with a timer block, delay a rocket barrage. after that, also with a timer, you can call usepinned_onoff and autolandmode to make the drone go back to base.

Or, you can wait a bit for an update that will make that easier. :)
CTH2004 4 Apr, 2018 @ 5:21pm 
Um... there is one manuver you forgot! The CRASH Manuver! (Seriously, that would be perfect for a self destruct, or, once space support is in, a scenerio could have you start right abover a plantet, and on a timmer cause it to crash! You wouldn't think anything was up, until you're down!)

Thanks Khjin
The Meanie 4 Apr, 2018 @ 2:14pm 
Any chance for an attack mode? Like it tries to circle a point you aim at, or "Raid" it goes to a place, firing weapons on any detected enemies, and then returns to the sendoff location?

Also thank you a LOT for this script, it's the first time I've ever managed to make anything that can do a thing without me controlling it manually! :D
Khjin  [author] 3 Apr, 2018 @ 11:10am 
nvm, found your ship and fixed the CruiseMode problem. Enjoy :)
Khjin  [author] 3 Apr, 2018 @ 9:30am 
If you can link me a blueprint of your ship it would be a great help for me to figure out why CruiseMode is not doing what it's supposed to. Thanks!
remethep 3 Apr, 2018 @ 7:21am 
Happy to help out. :)
Khjin  [author] 3 Apr, 2018 @ 7:19am 
@remethep there's a few settings I was not able to clearly include in the guide. Must be sleepy me taking over. Anyways, I noticed you autoland about 5 meters above the ground. This is the default landing height. You can customize this in the configuration part of the script. For hover mode, you need to aim the FCAM (no need to view) where you want to hover. What I usually do with hover mode is set the HOVER_HEIGHT to 900 meters, aim at an enemy turret and use hover mode. I can then safely bomb them since the ship will be out of turret range but the target is within range of the rockets. This is also good for dropping supplies. Covermode detection range is the max range of your sensors and is mainly designed to follow the character or other slower moving land vehicles. Thanks again for reviewing the script. I'll improve it. :)
remethep 3 Apr, 2018 @ 3:06am 
Lovely script. But, I could not make friends with it it seems... Made a spotlight, and some of the features I could not get to work. Might be me being a bit dense...

https://www.youtube.com/watch?v=ZZL_P5aKlc4&t=8s
Dr. Distortion 2 Apr, 2018 @ 5:06pm 
This is a great script! I really look forward to the Space features. Thanks!