Space Engineers

Space Engineers

评价数不足
Autopilot (Deprecated)
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
4.636 KB
2015 年 1 月 9 日 上午 1:06
1 项改动说明 ( 查看 )

订阅以下载
Autopilot (Deprecated)

描述
DEPRECATED by in-game Remote Control block. Believe it or not, there was a time before that block could do autopilot.

/**
* Autopilot
* Author: Extramrdo
* Contributor: Wheatley
*
* Setup:
* 1 Gyroscope facing forward, named "GYROInit", with all overrides set to 0. Override on or off, don't matter.
* the GPS setup:
* 1 block named "GPS Center"
* 1 block named "GPS Top" atop center
* 1 block named "GPS Left" directly to left of Center
* These directions are all according to intended dir of travel.
* 1 block named "GPSNav:", anywhere. Needs not be beacon, but you may wanna see that in realtime *shrug*
* 1 block named "CRD (123,123,123)". Replace the 123 with whatever XYZ coordinate you want.
* The parentheses are not optional, the space is.
* 1 or more thrusters, facing the rear of the vehicle, named "FWDGO".
*
* OPTIONAL:
* if you've got a soundblock you want to play, name it "OnArrive"
* 1 block named "Out"; a condensed version of the stats will be printed to it.
* 1 block named "T-"; an estimated time of arrival based on approximate max speed will be printed to it.
* TODO: actually calculate current speed, base it on that.
* TODO when not so sleepy and not 4AM: Uncomment the relevant line or something. Like, it's a IMyTerminalBlock timeblock = BlockNamed("T-");if(timeblock!=null) timeblock.SetCustomName("T-"+timestr);
*
*
* Operation:
*
* Get a timer to play this script like, every second. The faster the better.
* Set GYRO to Override On, and the Autopilot'll take care of steering and flying.
* Set CRD's coordinates to wherever you'd like to go; if you change them midflight, it will still work.
* If you're about to hit an asteroid, or you just wanna steer a bit, turn the GYRO to Override Off, and the autopilot will let off the gas AND give you back control. When you're done avoiding that asteroid, just GYRO to Override On again and the autopilot will pick up where you left off.
*
*
*/
55 条留言
Rusted Droid 2021 年 5 月 11 日 下午 7:58 
@extramrdo Vanilla Remote is very cheap for not overrun CPU. Really bad idea if you have device that is forced to go on line/track.
Remote control block try to spin train when in precision mode. Without that mode it will skip waypoint like 5m away so forget about U turn tracks it will skip and rotate train and explodes.

So yeah, it is good for spaceships but not for cart on magnetic rail from Maglev Rail mod.
Extramrdo  [作者] 2021 年 5 月 11 日 下午 5:58 
And this works better? I'm surprised and a little saddened.
Rusted Droid 2021 年 5 月 11 日 上午 10:16 
Remote control block is not good for rail based devices. have big problems if you use Maglev rails mod and try to automate it like metro.
Extramrdo  [作者] 2016 年 2 月 6 日 下午 8:47 
To be honest, you're better off using the remote control block.
Mitch-Mash 2016 年 2 月 6 日 下午 1:09 
could u use it on planets
Dr. Cockter 2015 年 3 月 23 日 下午 9:38 
how in bloody hell do you calculate pitch/yaw/roll? I cant seem to do that D':
☠†Shade†☠ 2015 年 3 月 4 日 上午 11:23 
well i have tried your script again, as it was the best one I have found, but it still is not working, I used to use it all the time, now when I turn it on, my timer block starts, and the shipp just laughs at me, is it the update that breoke it?
Extramrdo  [作者] 2015 年 2 月 5 日 下午 10:48 
It's a good question and a good problem, and I'm sorry this isn't your solution.
Draven_Stone 2015 年 2 月 5 日 下午 7:09 
k, just thought i ask
Extramrdo  [作者] 2015 年 2 月 5 日 下午 2:03 
You cannot, not as it is now. If you put the connector on the "front" of the ship (as far as this script cares, at least) and tell it to fly to a coordinate like, 1km away from the connector out in a straight line, then fly to the connector, you can get it to be probably facing the two connectors together. You'd need to fiddle around with the coordinates you set, and so on, but that's the only solution I can think of without a major overhaul.