Stormworks: Build and Rescue

Stormworks: Build and Rescue

62 ratings
LUA Sonar Display
3
2
   
Award
Favorite
Favorited
Unfavorite
Vehicles: Sea
Tags: v1.5.1
File Size
Posted
205.492 KB
5 Jun, 2022 @ 5:46am
1 Change Note ( view )

Subscribe to download
LUA Sonar Display

Description
Lua display for the new sonar, with the ability to display both passive and active targets

- Rangefinds active targets, displays bearing of passive targets
- Filters out deadzone noise
- Ping frequency based on distance setting
- Works on all monitor sizes (though 2x2 or above is recommended)

Setup:
- Place the sonar with the straight arrow on top and facing forwards, and the positive directional arrow facing clockwise
- Connect nodes as stated by their name
- Configure the properties of the microcontroller to your preferences

Notes:
- Due to a bug with sonar atm, targets that are passively detected cannot be detected by active sonar
- While moving, rangefinding for active sonar may become inaccurate depending on your own vehicle's speed and distance to the target
-You may notice passive targets highlighted when there are seemingly no vehicles around; this is likely due to your vehicle's own noise and is known as 'baffles'

Please give credit if you use this in a build!
39 Comments
DAGI | Virginia 21 Dec, 2024 @ 6:16am 
i tried it but just replacing didn’t work,
Maia  [author] 12 Dec, 2024 @ 11:50am 
tbh i'm working off of the same information as you since i've entirely forgotten how this controller works; the lua script(s) use the property.getNumber method to obtain the value from the max distance property, so to connect a keypad you'd need to write the value into the script(s) that use that property, and replace the property.getNumber with an input.getNumber. Might be difficult as i believe the code is minified
DAGI | Virginia 10 Dec, 2024 @ 12:55am 
can i connect small keypad with max distance? if yes, how can i do it? property number for max distance value doesen`t connect with anything
Captain 3 Sep, 2024 @ 1:43pm 
Toggle button screen on, add video input, add electricity. @BomberEx
BomberEx 8 Apr, 2024 @ 3:02pm 
For some reason the screen doesnt show anything
Maia  [author] 21 Jul, 2023 @ 2:12pm 
active sonar can ping the fish, sw devs haven't really given us a way to filter them out. if you wanna fix it you gotta disable wildlife
Noodle3123 19 Jul, 2023 @ 12:00am 
nvm does it also ping the ground i bee geting mutiple pings during chilling nothin around me (i have no fucking clue how sonars work)
Noodle3123 18 Jul, 2023 @ 11:58pm 
Why is the ping always one one side of the moniter?
Noodle3123 18 Jul, 2023 @ 11:54pm 
nvm i saw the instructions anyways W sonar :steamthumbsup:
Noodle3123 18 Jul, 2023 @ 11:52pm 
Where does the toggle active sonnar goes?