Space Engineers

Space Engineers

121 lượt đánh giá
Formation System - Flight Follower
   
Giải thưởng
Yêu thích
Đã yêu thích
Bỏ thích
Kích cỡ file
Đã đăng
Đã cập nhật
43.184 KB
19 Thg10, 2018 @ 2:55pm
29 Thg09, 2020 @ 8:18pm
13 ghi chú thay đổi ( xem )

Đăng ký để tải xuống
Formation System - Flight Follower

Mô tả
Note: This project has been abandoned and will no longer receive updates.

This is the follower script for my formation flight system. These scripts together allow you to set a ship to follow another in a specific position relative to the leader.

For best performance, the follower ships should have the same or more maneuverability than the leader ship.

Requirements
A remote control block on both the follower ship and the leader ship that points forward.
A radio antenna on both the follower ship and the leader ship.
Thrusters in all directions and enough fuel/power for all the thrusters.
Read the settings in the scripts.

Commands
Commands can be run in the follower script argument box or you can transmit a command to the system by using the leader script argument box.
  • setoffset;x;y;z - sets the offset variable to this value
  • addoffset;x;y;z - adds these values to the current offset
  • stop - stops the script and releases control to you
  • start - starts the script after a stop command
  • starthere - starts the script and sets the offset to the current position.
  • reset - resets the offset and the default configuration to the default offset.
  • clear - forces the script to forget a previous leader when calculateMissingTicks is true
  • save(;name) - saves the offset to the specified configuration.
  • savehere(;name) - saves the current position to the specified configuration.
  • load;name - loads the offset from the configuration

Configurations
You can have multiple offsets for your ship. They are manipulated using the save, savehere, and load commands. The offsets for the saved configurations can be directly modified in the CustomData field of the programmable block. By default, the script will have a single 'default' configuration with the default offset. When you make changes to the CustomData directly, you should recompile the script to make the changes appear. CustomData will only be updated by the script when using the save and savehere commands. Warning: Any error in the CustomData will cause the entire script to reset.

Collision Avoidance
This script has collision avoidance, but is disabled by default. Check settings to enable it. This uses the camera raycasting functionality to try to find any obstacles between the ship and where it is supposed to be. The more cameras your ship has, the better the collision avoidance will be. The cameras must be facing away from the ship. This process uses a lot of cpu, so expect lag if you use many followers with many cameras.

Setting The Offset
( > denotes a command )
> stop
Fly the ship to where you want it
> starthere

OR

( assumes a config has been previously saved using save;name command. )
> load;name

OR

> setoffset;x;y;z


Source Code
https://github.com/austinvaness/FormationSystem/tree/master/FormationFlightFollower
114 bình luận
LexiTheFox 16 Thg03 @ 7:59am 
i tried offsetting it but it still keeps rotating the wrong way
LexiTheFox 16 Thg03 @ 7:54am 
i cant get this thing to work, i get it working but the ships end up rotating the wrong way
FHN 20 Thg07, 2024 @ 1:29am 
Arbiter1223 thanks, that helped.
Pettmybuckets 19 Thg02, 2024 @ 9:40pm 
looks like this mod might have issues with the new suspension types? keeps coming up with an error.
The Strongest Hobo 12 Thg02, 2023 @ 7:27pm 
how do i select a leader
~WiFiCatGirl~ 4 Thg01, 2023 @ 3:08pm 
I am pretty sure this works, although I'll try again and report back here.
Obiben27 24 Thg11, 2022 @ 12:31pm 
this is great wish you didnt abandon it
Paxination 18 Thg09, 2022 @ 10:02am 
Nvm im an idiot. pb was turned off on follower even tho it was telling me "READY"
Paxination 13 Thg09, 2022 @ 5:02pm 
Disco429, how did you get it to work? Non of my ships will follow my leader. and i have the leader ship running the leader script.
DISCO429 5 Thg09, 2022 @ 4:02pm 
Works for me as of today