@inputs Dis Pass:entity
@outputs Sats:array 
@persist Chroma:array
if(first()){
C=1
H=255
M=128
L=0
#Zap1
Red=vec(H,L,L)
Green=vec(L,H,L)


}

###Disposable Sats
if(Dis){
findInSphere(Pass:pos(),200)
findSortByDistance(Pass:pos())
findClipToClass("turret")
C1 = findResult(1):getColor()
C2 = findResult(2):getColor()
C3 = findResult(3):getColor()





if 
(C1:x()==255) {C1a = 1}
if
(C1:y()==255) {C1a = 2} 
if
(C1:z()==255) {C1a = 3}

if 
(C2:x()==255) {C2a = 1} 
if
(C2:y()==255) {C2a = 2} 
if
(C2:z()==255) {C2a = 3}

if 
(C3:x()==255) {C3a = 1} 
if
(C3:y()==255) {C3a = 2} 
if
(C3:z()==255) {C3a = 3}
entity():setColor(255,255,0)
Dis2=1
}
if(Dis2){
if (C1a==1 & On) {T1F = F1} elseif
   (C1a==2 & On) {T1F = F2} elseif
   (C1a==3 & On) {T1F = F3} else {T1F = 0}

if (C2a==1 & On) {T2F = F1} elseif
   (C2a==2 & On) {T2F = F2} elseif
   (C2a==3 & On) {T2F = F3} else {T2F = 0}

if (C3a==1 & On) {T3F = F1} elseif
   (C3a==2 & On) {T3F = F2} elseif
   (C3a==3 & On) {T3F = F3} else {T3F = 0}

N9p = "+gm_special 9;" N9m = "-gm_special 9;"
N7p = "+gm_special 7;" N7m = "-gm_special 7;"
N3p = "+gm_special 3;" N3m = "-gm_special 3;"
}