Space Engineers

Space Engineers

"Behind you" drone-companion script
423 条留言
Skleroz  [作者] 2022 年 12 月 2 日 上午 2:27 
@jivaii Yes, script works with thrusters.
jivaii 2022 年 12 月 2 日 上午 1:06 
I take it this only works for flying drones, not rover drones?
Skleroz  [作者] 2022 年 10 月 30 日 上午 1:43 
@CDR.Kitten Good news! Glad to to hear that script is working again
User error is totally normal, without error will be no progress XD
CDR.Kitten 2022 年 10 月 29 日 下午 8:14 
The script works fine after having built a new one from scratch. I think it's just some weirdness when trying to update the ship. Most likely it's my own user error honestly. XD
Skleroz  [作者] 2022 年 10 月 29 日 上午 11:35 
@CDR.Kitten I have an idea. Script calculates average runtime in terminal?
Skleroz  [作者] 2022 年 10 月 29 日 上午 11:31 
Well, this kinda strange, until it has thrusters, gyros, sensor and some type of control block with "_Follow" appendix, it should work. At least, it works in my local example world. Script needs text panel of the PB, it could be an issue, when PB replaced by modded one.
CDR.Kitten 2022 年 10 月 28 日 上午 3:32 
Yeah my old BB was from Aug-2020. It served me well until I realized the script has been overhauled. I swear, time flies when you're having fun. :D I did try to throw in the new appendix but the whole girl was like, way too old. I decided to mothball my BB-02. I mean, to give an example her antenna was like An0.follow and a bunch of old stuff back when times were simplier and a bit more buggy. :D
Skleroz  [作者] 2022 年 10 月 28 日 上午 12:05 
@CDR.Kitten Hi! "program.V is not used..." - this is just warning, it shouldn't break anything. In old versions there were a lot of unused variables in the code =)
Regarding version changes - if I remember correctly, there were several appendix changes? it could source of the problem. In the actual version for all terminal blocks used by the script appendix "_Follow" have to be applied. Hope this will help!
CDR.Kitten 2022 年 10 月 27 日 下午 11:20 
Heyoh. I'm getting a, program.V is not used error on code-check.Not sure if impacts anything but, after having updated my drone from an ancient version of the code, she's not too keen on doing anything haha.
Skleroz  [作者] 2022 年 10 月 10 日 上午 10:38 
@Shadaris Hi! Custom turret controller doesn't work without full setup. Theoretically you could install two rotors and camera but it makes grid too complicated.
Shadaris 2022 年 10 月 10 日 上午 8:35 
other then using a longer sensor mod, would it be possible to adjust to use the custom turret controller in order to locate the player at least past sensor range? then swap to the sensor for "fine tuning"
Skleroz  [作者] 2022 年 9 月 15 日 下午 2:46 
@Texnik Если моды сервера не затрагивают работу сриптов и/или сенсор, проблем в теории быть не должно. У всех жизненно важнй блоков должен быть соответствующий аффикс, вроде больше ничего не требовалось. Как вариант, соббственники у ПБ и дургих блоков разные, может повлиять.
Texnik 2022 年 9 月 15 日 下午 2:16 
Не наботает на сервере Sofa Space
Или я что то делаю нетак, хотя перепробовал, как мне кажется, уже всё
Skleroz  [作者] 2022 年 8 月 17 日 上午 1:29 
Этот скрипт никогда не задумывался как боевой. Не те задачи. Поставить турель на грид можно, но какой-либо оптимизации или нацеленности на боевое применение не планировалось.
shllyapnikov 2022 年 8 月 16 日 上午 4:07 
Кстати скрипт Behind you может защитить от пауков, волков и вражеских дронов?
shllyapnikov 2022 年 8 月 16 日 上午 4:04 
2-й вариант на мой взгляд (Если это возможно) это удаленное управление. (Т.е скрипт загружается на корабль и через различные антенны и ДУ с камерой управляет им). Плюс сенсор настроенный на обнаружение ракет, метеоритов, врагов и гридов. Главная задача дрона по сути это эскорт т.е сопровождение любого вида. Ну или создание мода.
shllyapnikov 2022 年 8 月 16 日 上午 4:04 
Ну в принципе возможно создать скрипт конкретно для корабля. И как вы сказали 1-й вариант это разделение скрипта на основной и дополнительный которые будут обмениваться координатами (Чем то напоминает скрипт Auto-Docking Optional Home Script 2: https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2155667657 и Spug's Easy Auto-Docking 2: https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2146371052 . Но они не боевые).
Skleroz  [作者] 2022 年 8 月 16 日 上午 2:13 
И все это вкупе не решает проблемы отслеживания, какой из гридов владельца сейчас управляется владельцем. Это серьезно мешает и обнуляет все костыли для следования на большом расстоянии.
Skleroz  [作者] 2022 年 8 月 16 日 上午 2:11 
Турели вне задачи - если они не могут стрелять, они не ловят цель (не знаю, справедливо ли это сейчас), да задачи у этого скрипта исключительно мирные, не про это. Пиратский скрипт работает на команде, недоступной, когда владелец ПБ - это игрок.
Skleroz  [作者] 2022 年 8 月 16 日 上午 2:11 
@shllyapnikov Я скорее пишу про то, что если для решения задачи использовать моды, то нет смысла ограничиваться внутриигровым скриптом, а сразу делать мод. Толку, если и так придется моды ставить, где один, там и несколько. Для того, чтобы получать координаты другого грида средствами внутриигрового программирования, на другом гриде должен тоже стоять ПБ, либо нужно как-то коннектиться и запоминать блоки. В таком случае проще пристыковать дрон и транспортировать его.
shllyapnikov 2022 年 8 月 16 日 上午 1:43 
@Skleroz Но все это лишь мои идеи, к сожалению я не программист.
shllyapnikov 2022 年 8 月 16 日 上午 1:43 
@Skleroz Главное то, что маяк, ЛА и Антенна могут транслировать свое местоположение ну или на худой конец наверное можно переделать родной скрипт пиратов (Был случай когда все блоки я передал на себя, а скрипт остался работать. Так этот дрон следовал за моим кораблем по всей карте даже прыжковый двигатель не спасал и немного стрелял когда догонял а потом переставал и висел рядом).
shllyapnikov 2022 年 8 月 16 日 上午 1:41 
@Skleroz Т.е на мой взгляд дрон должен по сути должен следовать за одним блоком на расстоянии (Например: дальность 1 км и высота 600 м от маяка или антенны) и если улучшенный сенсор фиксирует врага команда следовать за блоком сменяется командой лететь к врагу и обратно. Вместо сенсора можно использовать турель у нее дальность до 800м.
shllyapnikov 2022 年 8 月 16 日 上午 1:40 
@Skleroz (Т.к ЛА способна устанавливать линию связи между двумя блоками и передавать свои координаты и наверное можно привязать дрона как на веревочке до 200км),(А антенна как и маяк, способна транслировать свое местоположение до 50км).а улучшенный сенсор использовать только для обнаружения врагов.
shllyapnikov 2022 年 8 月 16 日 上午 1:40 
@Skleroz По поводу проблемы следования за гридом: А что если использовать кроме сенсора использовать маяк, (По сути маяк это путевая точка или навигационный маркер, дальность вещания до 200км, прыжковые двигатели могут использовать маяки в качестве цели для прыжка, наверное можно аналогичным образом использовать маяк как цель за которым следует дрон) лазерную антенну или антенну.
shllyapnikov 2022 年 8 月 16 日 上午 12:36 
@Skleroz Ну я бы так не сказал. Мод только добавляет блок сенсора с увеличенным радиусом чувствительности. А так это самый обычный сенсор и без скрипта который управляет блоками (Даже если они модифицированные) никуда. Скрипт принял этот мод как свой родной (И не только этот мод) и дрон смог просто обнаружить меня на большем расстоянии, чем при использовании ванильного сенсора.
Skleroz  [作者] 2022 年 8 月 15 日 下午 1:31 
Если с модами, то и скрипт не нужен, вся задача тогда решается намного проще =)
shllyapnikov 2022 年 8 月 15 日 上午 7:56 
Ну, что касается сенсора решение есть: https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2311663286&searchtext=10+Sensor . Проверял на на дроне, работает.
Skleroz  [作者] 2022 年 8 月 15 日 上午 6:04 
@shllyapnikov Со следованием за гридом владельца есть две проблемы - в отличе от персонажа, таких гридов в радиусе сенсора может быть несколько, и у грида могут быть больше габариты. Я пробовал изначально делать проверку и по персонажам, и по гридам, но как-то криво работало. Еще есть проблема с маленьким радиусом сенсора - реакция на изменения после обнаружения объекта следования. 50 метров часто не хватает, чтобы затормозить.
shllyapnikov 2022 年 8 月 15 日 上午 5:24 
Are there any plans to add a follow ship function? So that the drone could follow and guard the ship? (You can write in Russian).
Skleroz  [作者] 2022 年 8 月 15 日 上午 3:38 
@shllyapnikov Hi! Unfortunately, it follows only character due to limitation within code.
shllyapnikov 2022 年 8 月 14 日 下午 10:56 
Hello, please tell me how to make the drone follow you when you are in the cockpit of the ship?
Skleroz  [作者] 2022 年 8 月 10 日 上午 10:52 
Super! Thank you!
Ejcreeper 2022 年 8 月 9 日 下午 2:32 
Sure just make sure it has requirements LOL
Skleroz  [作者] 2022 年 8 月 9 日 上午 1:24 
@Ejcreeper Nice drone, good acceleration! Glad to see this script still working in space XD
Can I add your drone to example list?
Ejcreeper 2022 年 8 月 8 日 上午 11:25 
Oh yeah it's meant for space LOL
Ejcreeper 2022 年 8 月 8 日 上午 11:24 
Hi, gravel uhhhh lol I just made a perfect drone for a swarmer but mostly its for following player and defending (buttons on back) thank u Skleroz though https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2846486943
Skleroz  [作者] 2022 年 6 月 9 日 下午 12:05 
@GravelGavel Hi. It is possible, but not practical due to short detection range of the sensor. For the big distances and big speed whole detection part should be done via raycast.
GravelGavel 2022 年 6 月 8 日 下午 11:17 
Would it be possible to modify the script to have it follow a ship instead of a player? For something like a drone swarm. Ex: You have the lead ship remote piloted by a person then a bunch of these drones carrying turrets following the lead ship, lead the drones into range of an enemy and all the turrets open fire.
Skleroz  [作者] 2022 年 4 月 27 日 下午 11:00 
@Renegade Thanks! Try to do my best =)
Ren 2022 年 4 月 27 日 下午 6:01 
So happy to see this is still being updated. Coming back after about a year and I always loved this script, I was never able to get something like this working on my on
Skleroz  [作者] 2022 年 4 月 19 日 上午 8:29 
@Lord Death Pyro Looks like I didn't think too hard about clear command naming =) "stop" literally stops script execution (I forgot to add any king of clear_antenna_text task, sorry), to restart it will need "start" command. You can use "follow" to switch follow mode on and off, it was made to utilize only one button for simplified control
Пиро 2022 年 4 月 19 日 上午 8:23 
solved it adding iS = 0; at line 103 and replacing Upd_Me(0) to Upd_Me(2) to not pause the updatefrequency. Now it stops.
Пиро 2022 年 4 月 19 日 上午 7:57 
Yep, it solved the problem when remove the tag from the connector, but, now I found something strange, when I hit "stop" when in follow mode, it stops, but the antenna keeps displaying Follow Player and the follow command bugs out, is something wrong with how I'm triggering the commands?
Skleroz  [作者] 2022 年 4 月 19 日 上午 12:31 
About "follow" from connector - it should fly directly up from connector face, if waypoints weren't set.
Skleroz  [作者] 2022 年 4 月 19 日 上午 12:29 
@Lord Death Pyro Connector will not be used, if it hasn't name appendix. Without connector whole connection class should be skipped in the script. I'a afraid there are 20-30 instances in the script, where connector is used.
Пиро 2022 年 4 月 18 日 下午 5:26 
Had to comment from line 221 to 259 to solve this issue, this happens when I use command "follow" while connected to a connector, it behaves so strange that resulted on many drones destroyed, put a condition where if arg is follow doesn't trigger that "case -1" scenario.
Пиро 2022 年 4 月 18 日 下午 2:51 
Works really well but it conflicts with other scripts, is there a way to disable auto dock and flight/ascent after disconnecting?
Skleroz  [作者] 2022 年 4 月 15 日 上午 2:08 
Well, yes =) I switched off forced range increase, it worked quite bad in some scenarios.
Пиро 2022 年 4 月 14 日 下午 8:13 
I think I know why, you have to increase the detection values for the sensor.