Radar signals

by Darkcry

Outputs signals for selected filters when placed near a radar

Utilities
a month ago
0.16 - 2.0
2.62K
Circuit network

g Not Working?

11 months ago

I'm not sure I understand how the radar signal is supposed to work. I've tried adding a filter to the modified "combinator", connecting it with and without a radar connected via the circuit network to a power pole, and the only output on the power pole is from the combinator itself. I've waited more than 4 seconds and the "detected" items never updates, just outputs whatever signal the combinator is giving. I tried setting the constant integer to 0, but no signal is ever given.

Even in the picture given in the information tab, it looks like the combinator is coded to have a constant value of 3 for the solar panel signal which is then sent to the power pole.

Am I missing part of the setup?

11 months ago

Start with a radar and place the special combinator exactly next to the radar. Then put any filter and the amount should update based on the entities that are found in the vision range of the radar.
Connect the combinator to the network as with a regular one.
If the radar is not working then the signals also not updating. And you can only check for things that can be placed down or units

10 months ago

I fixed an issue that prevented multiple combinators to be updated. Only the first combinator was properly updated so my testing always worked...
I assume your problem occured when you used multiple of these combinators around the map. This should now be fixed.

12 days ago
(updated 12 days ago)

I'm having the same issue, the combinator doesn't really seem to do anything. I'm testing it with a Small Demolisher on Vulcanus.
I placed the radar, placed the combinator next to the radar, added a "filter" for Small Demolisher (even tried other demolishers and entities) and nothing.
Even after waiting many seconds, it doesn't even change the signals from 1 to 0.

EDIT: found the issue, at least for my use case.
The script does not fire on many entity create/destroy signals (the API is so jank, I wish we had a unified event for them, but here we are...)
As a result, many things like remote map building, mods like Quantum Fabricator, building on space platforms, quirky edge case ways to copy-paste, blueprints etc. sometimes do not work.
I fixed my case by adding the following:

script.on_event(defines.events.script_raised_revive, function(event) addCombinator(event.entity) end, {{filter = "name", name = "radar-signals"}, {filter = "name", name = "radar", mode = "or"}}) script.on_event(defines.events.script_raised_built, function(event) addCombinator(event.entity) end, {{filter = "name", name = "radar-signals"}, {filter = "name", name = "radar", mode = "or"}}) script.on_event(defines.events.on_space_platform_built_entity, function(event) addCombinator(event.entity) end, {{filter = "name", name = "radar-signals"}, {filter = "name", name = "radar", mode = "or"}})

script.on_event(defines.events.script_raised_destroy, function(event) removeCombinator(event.entity) end, {{filter = "name", name = "radar-signals"}, {filter = "name", name = "radar", mode = "or"}}) script.on_event(defines.events.on_space_platform_mined_entity, function(event) removeCombinator(event.entity) end, {{filter = "name", name = "radar-signals"}, {filter = "name", name = "radar", mode = "or"}})

New response