Squid detection system

Squid detection system - Emergency safety fire detection system box for safety with inscription and push button placed on white wall in light room

So I'm trying to make a system that will kill any mob that doesn't have a squid on it's head (I'm starting with zombies as once I figure it out for one mob I can easily add a different mob). So how I started was I made a scoreboard objective that I called nearSquid.

/scoreboard objectives add nearSquid dummy

Then I rigged up some repeating/chain command blocks together and had them run these commands.

/execute @e[type=Zombie] ~ ~ ~ /scoreboard players set @e[type=Squid,r=2] nearSquid 1

/execute @e[type=Squid] ~ ~ ~ /scoreboard players set @e[type=Zombie,r=2] nearSquid 1

Therefore any zombies (that are near a squid) and squids (that are near zombies) get a score of 1. Now my problem is that how do I make the zombie/squid get a score of 0 when they aren't near the other one.

Now I know that this system has the flaw of if zombies are bunched close together they may be in the radius and be safe until the squid/zombie moves away. So if you have a different system that can fix this flaw I'd be happy to hear it. other wise how would I make the squids/zombies get a value of 0 when not near the other.

Hopefully I made myself clear. If not let me know and I'll will try to make it clearer.






Pictures about "Squid detection system"

Squid detection system - Anonymous mechanic fixing rocket details during assembly
Squid detection system - Gray Tunnel With White Light
Squid detection system - Old fashioned cassette player placed in shabby garage near old industrial equipment



How does a SQUID sensor work?

A SQUID sensor is basically a magnetic flux-voltage converter having an extremely low magnetic flux noise. The physical quantities (magnetic field, current, voltage, displacements, etc.) to be detected are converted in a magnetic flux by using suitable flux transformer circuits.

What is a SQUID sensor?

A SQUID (superconducting quantum interference device) is a very sensitive magnetometer used to measure extremely subtle magnetic fields, based on superconducting loops containing Josephson junctions.

How does a SQUID magnetometer work?

In a superconducting ring with one (so-called rf SQUID) or two (dc SQUID) weak contacts, \u0394\u03c6 is additionally influenced by the magnetic flux \u03a6 through this ring. Therefore, such a structure can be used to convert magnetic flux into an electrical voltage. This is the basic working principle of a SQUID magnetometer.

How does an RF SQUID work?

A radio frequency (RF) SQUID is made up of one Josephson junction, which is mounted on a superconducting ring. An oscillating current is applied to an external circuit, whose voltage changes as an effect of the interaction between it and the ring. The magnetic flux is then measured.



Superconducting Quantum Interference Device (SQUID)




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Nothing Ahead, SpaceX, Tamara Martina, Andrea Piacquadio