Space Engineers

Space Engineers

Not enough ratings
Ansible Marker Script (Decommissioned)
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
2.327 KB
18 Apr, 2015 @ 12:10am
28 Nov, 2015 @ 6:36am
4 Change Notes ( view )

Subscribe to download
Ansible Marker Script (Decommissioned)

Description
This Script Is No Longer Working As Sensor API Has Been Reworked

This script is a modified version of the Ansible Detector Script, to integrate with the Cruise Missile Script. It works similar but outputs text in the format readable by the cruise missile script.

The script itself does NOT require any mods. (Vanilla game script)

A demo world is setup to show how this script can be used with the Cruise Missile Script at:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=460236584

Features:
- Wireless sensor that can be deployed deep into enemy territories.
- Locks on to target after initial detection. After sensor detects the target, even for a brief moment, the target is information is cached and sensor can be destroyed without losing target.
- Auto corrects grid pivot such that the sensor will detect the true mid point of the grid instead of its grid pivot. This thaws any attempts to manipulate grid pivot e.g. 100m away from the ship to confuse the sensor.
- Built-in switches to perform target locking, sensor change, reset and targeting mode changes. Uses camera (cheapest block that is available on small and large ship) as switch.

Limitations:
- Sensor variable cannot persist through save game and script refresh. If the script is stopped for any reasons, the sensor need to be "paired" again (Merged back to the same grid).
- Sensor cannot be set to detect floating objects as the appropriate interface cannot be found at the moment.

Required Setup If Using Default Configuration:
- A Programmable block with this script.
- A looping Timer Block triggering this Programmable block ('Run' action) and itself ('TriggerNow' action).
- A sensor called "AN_SENSOR". This is the sensor that will be sent to target location. MUST be set to only detect small ships and large ships (Cannot detect floating objects or the script will fail).
- A block that can be turned ON/OFF (preferably a Camera) with the name "ACTION_LOCK".
- A block that can be turned ON/OFF (preferably a Camera) with the name "ACTION_RESET".
- A Text Panel called "CMD". If you are using this script with the Sogeki Targeting Script, then this Text Panel will be shared with that.
- An Interior Light called "INDICATOR".



----- Operating Sequence -----

1) First the Timer Block is activated to loop this script. The INDICATOR light will turn to Blue to indicate "AN_SENSOR" found and active.
2) The Merge Block is disengaged and the small ship with the AN_SENSOR is sent to the target location.
3) When the AN_SENSOR detects a valid target, the INDICATOR light turns to Green.
4) Turn ON the "ACTION_LOCK" block will signal the script to lock on to the target (Script will turn block OFF again to acknowledge). The INDICATOR light will turn to Red to indicate target locked.
5) Once target is locked, the script will constantly write targeting information to the "CMD" Text Panel's Public Title field. The targeting information is in the form of [T:<X>:<Y>:<Z>] where T is the position of the detected target. You can output additional information to the Public Title field by setting the Public Text field with the additional string. Example: If you put "D,P,W:1:2:3" in the Public Text field, the script will output [T:<X>:<Y>:<Z>,D,P,W:1:2:3] instead.
6) Turn ON the "ACTION_RESET" block to signal the script to unlock the target and return to waiting state (Script will turn block OFF again to acknowledge). The INDICATOR light will turn back to Blue if no target detected, Green if target detected or Yellow if "AN_SENSOR" is non functional.



----- Functions -----

INDICATOR (Interior Light) - Indicator light. Blue: Ansible ready to detect, Yellow: Ansible not detected or non functional, Green: Target detected, Red: Target locked/
CMD (Text Panel) - To output targeting information to its Public Text field. Targeting information is in the form of [A:<X>:<Y>:<Z>,B:<X>:<Y>:<Z>,D:<Ticks>] where A is the first detected position, B is the second detected position and D is the number of 1/60 second ticks taken for the target to travel between the 2 positions.
AN_SENSOR (Sensor) - Sensor to detect target. First the sensor is mounted on the same grid as the script. Then Merge Block is used to separate the sensor to send it into target location.
ACTION_LOCK (Any ON/OFF block) - Used as switch to lock on to target when sensor detects it.
ACTION_AUTOLOCK (Any ON/OFF block) - Used as switch to signal script to immediately lock on to target once it detects any target.
ACTION_RESET (Any ON/OFF block) - Used as switch to signal script to unlock target and return to waiting state.


----- Example Worlds and Blueprints -----

You can find a sample world setup using a customized version of this script at:
<In Progress>
16 Comments
F-16D Block-60 FemboiDILF 22 Jul, 2016 @ 10:29am 
Will there be a new script to work with the new API? This was one of my favourite scritps.
mrbojinkles 22 Oct, 2015 @ 8:37am 
Sorry, I didn't elaborate very well. The script is running fine (I've used it in the past). No exceptions, the indicator is functioning, and I am aquiring a lock. It simply isnt outputting target data. Though I suspect it's because the target is within range of the ansensor when the script is activated.
Alysius  [author] 21 Oct, 2015 @ 6:23pm 
There should be a switch to turn on locking mode (ACTION_LOCK or ACTION_AUTOLOCK). YtriggeredYou can put indicator lights to see if the marker is actually locking to a target.
mrbojinkles 21 Oct, 2015 @ 2:15pm 
Anyone else having a failure of the script to write target data?
Alysius  [author] 23 Jul, 2015 @ 5:59am 
Script updated to fix the compilation error caused by the rogue SE update.
F-16D Block-60 FemboiDILF 14 Jun, 2015 @ 11:55am 
Oh cool, I'll have to test it. I've had the worst luck so far.
Alysius  [author] 13 Jun, 2015 @ 12:07am 
A demo world is setup to show how this script can be used with the Cruise Missile Script at:

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=460236584
mrbojinkles 7 Jun, 2015 @ 12:52pm 
Yeah, I figured out that the issue was a glitch in the game, not a problem with your code.
Alysius  [author] 7 Jun, 2015 @ 11:40am 
Been busy playing TERA these few weeks. Just verified that the scripts are still working as expected (07-Jun-2015).
F-16D Block-60 FemboiDILF 25 May, 2015 @ 3:21pm 
IMyReflectorLight, got it, thanks that helps a spell. I wanted to make it as vanilla as possible and figured out adding a spotlight facing the pilot lit up the cockpit in a nice way to tell whether it was locked or not. I've just had no luck getting Blue_G to work with the cruise missile I started experimenting with this.