Space Engineers

Space Engineers

Not enough ratings
D99 Nav Sensor Lights v2.5
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
9.006 KB
14 Mar, 2015 @ 9:46am
24 Jul, 2018 @ 2:06pm
8 Change Notes ( view )

Subscribe to download
D99 Nav Sensor Lights v2.5

In 1 collection by Delta99
Great Space Engineers Scripts
9 items
Description
Provides Navigation / Collision Sensors and Lights. You can use this in any number of ways from just simple collision avoidance with other ships, platforms, stations, asteroids, players. Or, perhaps setup for docking situations to align your ship with a connector or anything else. It can be used more elaborately to determine how close you are to something.

Another use is for intrusion detection. You could setup sensors to only detect enemies in various parts of your ship and provide warning lights giving you an indication where they are. I was thinking of hooking it up to the sound block to give you warning sounds as well (or "intruder alert" type alerts).

All you need to do to use this is subscribe to the mod obviously and then add it in a programming block. A timer block is also required along with as many appropriately named sensors and lights that you can power on your ship. You can use Interior lights or spotlights.

How to use:

1. Add a programming block, go to its control panel properties and hit edit.
2. Click the browse workshop button at the bottom right. You should see a list of mods/scripts you have subscribed to. If not click on refresh.
3. Click on D99 Nav Sensor Light and hit ok. I should appear in code now.
4. Hit remember and exit. Nothing else needed. You don't need to hit run.
5. Add a Timer block to your ship/station.
6. Go to its control panel properties and set Delay to 1 second. This will signify to the program to update the lights every second. If you want a longer delay just put it here. Note as well that any new sensors or lights on your ship are recognized without you having to do anything. The timer is set to 1 minute. Adjusting this Delay will also adjust how long the sensors and lights are re-evaluated. (2 seconds here = 2 minutes).
7. Go to setup actions on the timer block.
8. In the toolbar for the 1st action select the programming block and run.
9. In the toolbar for the 2nd action select this timer block and start.
10. Click start on the timer block. You should see it cycling every second.

Now you can place as many sensors and lights as you like named appropriately. The D99 Nav Sensor program will pickup any newly placed sensors and lights so there is no need to adjust the program at all or restart it.

Sensors must be named with "Sensor Nav <zone>" where zone is anything you'd like to name your zones.

The lights must be named with "Light Nav <zone>" where zone corresponds to the <zone> setup in the sensor(s).

You can have any number of sensors triggering a <zone> and any number of lights in the same <zone>.

For example, if you have 2 sensors on the front of your ship and covering the right and left sides named like so:

"Sensor Nav <Front>{right}" and "Sensor Nav <Front>{left}"

and lights named as so:

"Light Nav <Front>{bridge}" and "Light Nav <Front>{engineering}"

And you have one of those lights on your bridge and the other in Engineering, both will turn on when either of the <Front> sensors are triggered.

You can have as many lights and sensors as you can power.

You can have the sensors trigger on whatever you like based on their properties. I suggest turning on all properties.

The lights can be set to whatever properties you'd like when they are turned on. Maybe you want blinking red lights or solid lights. Its up to you.

See the demo video above for a number of examples.

Credit to rockyjvec for his EasyAPI (no need to have it in your mods as its included in my script). See http://steamproxy.net/sharedfiles/filedetails/?id=379297410
(NOTE: EasyAPI doesn't seem to be maintained anymore so I have made changes to it to fix stuff that is no longer supported by the ModAPI).

Used in the demo video:
Various ships from Tristavius Shipyards Inc. by Tristavius - http://steamproxy.net/sharedfiles/filedetails/?id=308332466
Phoenix Embassy from Phoenix Fleet Systems by Dark Lord - http://steamproxy.net/sharedfiles/filedetails/?id=317488717

UPDATE: Just figured out my mod can work in conjunction with MMaster's Configurable Automatic LCD's. See http://steamproxy.net/sharedfiles/filedetails/?id=403921671 and new screenshots I am adding here to see it in action.

Instructions for use with MMaster's Configurable Automatic LCD's.

1. Follow MMaster's instructions for the basic setup of his LCD's. At minimum you need a programming block, timer block and an LCD (you can put as many LCD's as you need/want).
2. To get all Nav Sensor Light status' on a single LCD use this as a command in the LCD panel: "Working {Light Nav} Light:On Light:Off". That will display on a single panel the status of the Sensor / Lights combo.

Another option is to have 2 panels each displaying either the ON or OFF Sensors / Lights. See screenshot above. For this create 2 LCD panels. In the first one place "Working {Light Nav} Light:On" as the command. In the other "Working {Light Nav} Light:Off" as the command.
23 Comments
Taynak 4 Jan, 2020 @ 6:08pm 
Ok thank you for the info and lead :)
Delta99  [author] 4 Jan, 2020 @ 2:33pm 
@taynak there is no way to make an LCD a video feed. People have been asking that for years. There could be some separate mod though that does such a thing but I doubt it.

The real issue is with EasyAPI which I use. I don't think the author keeps that up to date. I've had to make changes to it in the past to keep it working. Might be worth seeing if he is still around and / or has updated it to fix any issues. If so, it can easily be replaced in my script and things should work straight away. Unless it is something specific in my part of the script but doubtful.
Taynak 3 Jan, 2020 @ 11:13pm 
Cool thank you :) Love the idea of the script though... with all the stuff that MMaster did to his script you would think this the navigation would be standard ... :shrug: Still trying to figure out how to make an LCD display a video feed... new to the game so lol

Delta99  [author] 3 Jan, 2020 @ 5:41pm 
@Taynak yeah most likely. I don't regularly check or even fire up SE much these days. If / when I get a chance I will look into the errors.
Taynak 3 Jan, 2020 @ 1:23pm 
getting a lot of errors when trying to compile the script... maybe because of update?
Stevros1903 10 Jul, 2017 @ 4:24pm 
@Delta99 Yer sure thing still only 50% through my build at the moment so will be a while but will let you know if i do get anywhere :-)
Delta99  [author] 8 Jul, 2017 @ 1:51pm 
@stevros1903, hopefully you get something going with this. If so, would like to see your creation.
Stevros1903 7 Jul, 2017 @ 4:47pm 
@delta99 thanks so much for repply dude. Shame your not realy in to SE too much any more seems to be the way with a lot of people. will have a play see what i can acheive once ive finished my ship. Thanks again
Delta99  [author] 6 Jul, 2017 @ 6:32pm 
@Stevros1903, I wanted to do something similar to this from day one that would actually use a range of colors depending on the distance from a single sensor but I can't recall why that wasn't "easy" to do or maybe it wasn't even possible. I also thought of something similar to what you are suggesting which sounds a lot easier and doable. I don't think I ever spent the time in doing so however.

Sorry, for not having a better response. I haven't touched this script in ages and barely have touched Space Engineers in ages. If I get back into it anytime soon I will look at perhaps implementing something like this.

What I have done in my builds is use multiple lights of course but that gets cumbersome especially if you don't have the room to put the lights. I've also used MMasters LCD's more effectively as it is easy to setup the displays to get decent readouts from various sensors.
Stevros1903 6 Jul, 2017 @ 1:57am 
Hi @Delta I was looking at this script and looks like exactly what I need for my new large ship build great idear! But was wondering if you thought it would be possible to edit the code for a due warning system so two sensors could control a single light. I.e. one sensor for medium distance makes light yellow then a second sensor with a smaller detection area makes the same light turn red? As I'm relatively new to codeing especially in space engineers.
Sorry if someone has asked this before couldn't find a search option to search the comments.