Space Engineers

Space Engineers

31 人が評価
Pirate Drone - Basic
   
アワード
お気に入り
お気に入り
お気に入りから削除
タグ: development
ファイルサイズ
投稿日
819.000 B
2016年12月16日 9時50分
1 項目の変更履歴 ( 表示 )

サブスクライブしてダウンロード
Pirate Drone - Basic

Meridius_IX / Lucas 作成の 1 件のコレクション
Meridius_IX's Script Library
5 アイテム
解説
This script will give a ship basic pirate drone behavior. It's similar to the vanilla pirate drone script, but with a few minor differences.


Behavior:

When the drone spawns, it will set its current location as its 'origin'. If a player comes within 10km of the origin point, the drone will begin chasing the player. If the player exits the 10km radius, the drone will return to the origin point.

Please note that this script will only function properly when the grid is owned by a hostile NPC player / faction.


Setup:

Your ship will need the following blocks:
- Remote Control
- Programmable Block
- Timer Block

1. Load this script into the Programmable Block and compile/save.

2. On the Remote Control block, "Collision Avoidance" should be turned "ON" and "Flight Mode" should be set to "One Way"

3. Set the timer block to Run the Programmable Block with default argument and "Start" the same timer block (so it loops). Set the timer block delay to 1 second.


Differences:

This script will calculate the origin differently than the vanilla drone script. When the drone spawns, it will check to see if an origin was already been set (which often happens when a player is testing drone designs). If an origin is detected, it will compare the distance of its current location with the stored origin. If the distance is greater than 15km (which in most cases it should be), then the drone will set its current location as the new origin.

The drone should only travel 10km from whatever it's origin is, so there's very little chance that it will venture out further than 15km from origin, triggering a new origin for itself.
51 件のコメント
Nitrogameace 2023年5月5日 12時10分 
is there any script that can?
Nitrogameace 2023年5月5日 12時10分 
Does this script not know how to use wheels?
Captain Durall 2022年5月16日 22時24分 
Did this stop working with thrusters? Ive tried modded unmodded thrust override everything
Daniel L Parry 2022年2月9日 9時41分 
great to know, with the new guns I'm looking to make my own targets that shoot back
Meridius_IX / Lucas  [作成者] 2022年2月8日 13時55分 
Probably, it's super simple/basic. I cannot imagine that anything that changed in the recent update would have broken it
Daniel L Parry 2022年2月8日 13時47分 
Out of curiosity, does this still function in a post Warfare 2 update version of the game?
ARK7 2020年8月26日 12時52分 
Ok
Meridius_IX / Lucas  [作成者] 2020年8月26日 11時36分 
no, this will only pursue player entities.
ARK7 2020年8月26日 11時24分 
will this go after NPC ships that are at war with the drone's faction. (will a SPRT drone go after a Reaver)
jackleyakul 2020年4月19日 13時00分 
ok. I figured that is the case.. that is how most of the pirate scripts are.. i was just hoping you "maybe" had modified it... it such a sad thing that there isnt a decent drone script out here.. there is so much potential for it, but no one has tackled it. every script i have tried has not worked well.
I appreciate your quick response!!

there are some scripts with limited or situational function, but nothing with true utility unless you know C# and make it yourself... i started dabling in coding specifically for this lack in the mod community, but im extremely unlearned and it will be awhile before i can make a functioning script.