Space Engineers

Space Engineers

355 ratings
Graphical Sensor Radar
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
3.256 KB
2 Feb, 2016 @ 1:58pm
8 Feb, 2016 @ 7:50am
6 Change Notes ( view )

Subscribe to download
Graphical Sensor Radar

Description
This is an InGame Programming Script that simply uses a sensor mounted on a rotor. It can detect anything that sensors can detect, including spiders. It works with or without sensor mods.

You only need:
1 timer block
1 programming block
1 rotor
1 sensor
1 text panel
(1 power source, obviously)
optional: 1 Remote Control block for long range scanning

1) Put a block on the rotor, and put a sensor on the block facing forward on your grid.
1.5) Optional: Place a remote control block somewhere else on your grid, facing forward, preferably with free line of sight in horizontal directions. It can't be too close to wheels, rotors, pistons or other screwy multigrid blocks.
2) Tweak sensor values to your liking. Front Extent is the important scanning range value. Left and right could improve detection. Top and bottom could find more things in 3D space.
3) Turn the rotor off and set it to ~10-20rpm. The faster it rotates, the less chance the rotor will pick up small objects at long range.
4) Put the script in the programming block, and edit the script to confirm the block name settings are accurate.
5) Put the programming block in the timer.
6) Put the timer in the timer so it triggers itself with TriggerNow and thereby loops
7) Turn the rotor on
8) Trigger the timer

Example Radar Car: http://steamproxy.net/sharedfiles/filedetails/?id=615964700

Update 1:
- I Implemented a "remoteMode" setting to use a Remote Control block instead of sensor, for very long ranges. It's turned off by default, because it's very difficult to get working, the reason i assume is that it detects it's own grid, just like some issues with the sensor. [Edit: Improved] It does not detect life-forms.
- I also added an "upsideDown" setting if you want to turn the rotor upside down and attach it to the underside of your ship, you can now do that as well.
Update 2:
- I made a new version that can handle 4 sensors or remotes in each direction: http://steamproxy.net/sharedfiles/filedetails/?id=616541074

Update 3:
- Better Remote Control Block detection (Thank you Skleroz). You don't need to put the Remote Control Block on the rotor anymore, you can place it anywhere you want. The remote gets the vector from the sensor instead, which works better. But this means you always need a sensor now.
- More automated block assignment. If it can't find a block of the correct name, it now grabs the first block on your grid of the correct type.
- A few performance optimizations and added max limits.

Update 4:
- I made a different version that doesn't need rotors. It can't detect life forms, though. http://steamproxy.net/sharedfiles/filedetails/?id=617905251

Update 1.5:
- I added a refresh rate limit setting to save computing resources and to hopefully fix Script Complexity Errors. Let me know if this worked.
- I fixed some detection problems with the long range scanner and it now has a separate virtual rotation speed.
- You can now switch between long range and short range scanning by passing the argument "switch" from a toolbar button
- You can now change long range scanning range by passing arguments "increase" and "decrease". It steps 100m by default, but can be changed in the settings.
- It now sets the font size to 0.4 automatically
225 Comments
BinaryKiller Recoded 11 Jan, 2021 @ 12:35pm 
Massive Error code....... Can't use this script......
THE GHOST 29 Dec, 2020 @ 1:51pm 
can confirm this is broken...shame
BinaryKiller Recoded 5 Dec, 2020 @ 9:50pm 
How long is the range? I wanna test something out with your script, see how correct it is, because I have a turret aiming somewheres and I am not quite sure what it is aiming at
[I.L]Methidox 12 Jun, 2020 @ 10:25am 
By chance has this, (and its counter part listed in "Update 4") been updated to working order? I finally got the game, and had my mind on this script
sysigy 16 Aug, 2017 @ 4:44pm 
If anyone is interested... I have fixed the script and it is now working in SE v1.182.x

You can download the fixed version here

alex-thatradarguy , let me know if you are not happy for me to host this fix.
Neo_ 22 Jan, 2017 @ 10:00am 
Does not working anymore.
sysigy 31 Oct, 2016 @ 7:40am 
Previously I commented stating this script is broken, however, I was mistaken. This script works fine once a single line of code has been changed relating to the IMyEntity interface. If cast IMyEntity to the VRage version the script seems to fire up and work correctly.

All you have to do is replace the line:

var entity = sensor.LastDetectedEntity;

with:

var entity = (sensor.LastDetectedEntity as VRage.Game.ModAPI.Ingame.IMyEntity);

I take no credit for this fix, I found it on a forum. :steamhappy:
Bobisback 13 Oct, 2016 @ 8:11pm 
ya pretty much every radar script is broken for a couple of months now. They where all using what the game dev considers an exploit. You can still use sensors for radar but any mod that had support for the remote control block is now broken. THe latest version of SE does add the ability to detect things with a camera now. Which is interesting.
The Joker 9 Oct, 2016 @ 9:39pm 
ok i don't know if im doing somthing rong but i get an error saying "assembly not found please compile script" and when i check code it says "program 53,4 error the type or member 'imyentity' is prohibited" there are some outher errors there but thay are just for unused code i know next to nothing about c++ and most coding langwiges in genral please help me to get this working the only radar script i got to work lags the game badly.
KagedDaemon 7 Sep, 2016 @ 7:25am 
reminds me of when i was in the Navy, i stared at the radar display almost every day for almost 5 years