I made these two egates with thwe purpose of a entity selector i cant get the wirelink to work correctly so if you have the spare time give me a hand.
Code:
@name EntSelector(EntInput)
@inputs A:entity B:entity C:entity D:entity E:entity F:entity G:entity H:entity
@inputs I:entity J:entity
@inputs EntExtensionOut:wirelink
@persist Av Bv Cv Dv Ev Fv Gv Hv Iv Jv
@persist Out_A:entity Out_B:entity Out_C:entity Out_D:entity Out_E:entity Out_F:entity Out_G:entity Out_H:entity Out_I:entity Out_J:entity
interval(10)
Out_A = A
Out_B = B
Out_C = C
Out_D = D
Out_E = E
Out_F = F
Out_G = G
Out_H = H
Out_I = I
Out_J = J
EntExtensionOut:setEntity("EntA", Out_A)
EntExtensionOut:setEntity("EntB", Out_B)
EntExtensionOut:setEntity("EntC", Out_C)
EntExtensionOut:setEntity("EntD", Out_D)
EntExtensionOut:setEntity("EntE", Out_E)
EntExtensionOut:setEntity("EntF", Out_F)
EntExtensionOut:setEntity("EntG", Out_G)
EntExtensionOut:setEntity("EntH", Out_H)
EntExtensionOut:setEntity("EntI", Out_I)
EntExtensionOut:setEntity("EntJ", Out_J)
if(Out_A:health() > 0) {Av = 1}else {Av = 0}
if(Out_B:health() > 0) {Bv = 1}else {Bv = 0}
if(Out_C:health() > 0) {Cv = 1}else {Cv = 0}
if(Out_D:health() > 0) {Dv = 1}else {Dv = 0}
if(Out_E:health() > 0) {Ev = 1}else {Ev = 0}
if(Out_F:health() > 0) {Fv = 1}else {Fv = 0}
if(Out_G:health() > 0) {Gv = 1}else {Gv = 0}
if(Out_H:health() > 0) {Hv = 1}else {Hv = 0}
if(Out_I:health() > 0) {Iv = 1}else {Iv = 0}
if(Out_J:health() > 0) {Jv = 1}else {Jv = 0}
EntExtensionOut:setNumber("EntNum", Av + Bv + Cv + Dv + Ev + Fv + Gv + Hv + Iv + Jv)
Max = (Av + Bv + Cv + Dv + Ev + Fv + Gv + Hv + Iv + Jv) Code:
@name EntSelector(Main)
@inputs EntExtensionA:wirelink EntExtensionB:wirelink EntExtensionC:wirelink EntExtensionD:wirelink
@inputs Up Down
@outputs Entity:entity EntNum Max
@persist AA:entity AB:entity AC:entity AD:entity AE:entity AF:entity AG:entity AH:entity AI:entity AJ:entity
@persist BA:entity BB:entity BC:entity BD:entity BE:entity BF:entity BG:entity BH:entity BI:entity BJ:entity
@persist CA:entity CB:entity CC:entity CD:entity CE:entity CF:entity CG:entity CH:entity CI:entity CJ:entity
@persist DA:entity DB:entity DC:entity DD:entity DE:entity DF:entity DG:entity DH:entity DI:entity DJ:entity
@persist AA_N AB_N AC_N AD_N AE_N AF_N AG_N AH_N AI_N AJ_N
@persist BA_N BB_N BC_N BD_N BE_N BF_N BG_N BH_N BI_N BJ_N
@persist CA_N CB_N CC_N CD_N CE_N CF_N CG_N CH_N CI_N CJ_N
@persist DA_N DB_N DC_N DD_N DE_N DF_N DG_N DH_N DI_N DJ_N
@persist MaxA MaxB MaxC MaxD
interval(10)
AA = EntExtensionA:entity("EntA")
AB = EntExtensionA:entity("EntB")
AC = EntExtensionA:entity("EntC")
AD = EntExtensionA:entity("EntD")
AE = EntExtensionA:entity("EntE")
AF = EntExtensionA:entity("EntF")
AG = EntExtensionA:entity("EntG")
AH = EntExtensionA:entity("EntH")
AI = EntExtensionA:entity("EntI")
AJ = EntExtensionA:entity("EntJ")
BA = EntExtensionB:entity("EntA")
BB = EntExtensionB:entity("EntB")
BC = EntExtensionB:entity("EntC")
BD = EntExtensionB:entity("EntD")
BE = EntExtensionB:entity("EntE")
BF = EntExtensionB:entity("EntF")
BG = EntExtensionB:entity("EntG")
BH = EntExtensionB:entity("EntH")
BI = EntExtensionB:entity("EntI")
BJ = EntExtensionB:entity("EntJ")
CA = EntExtensionC:entity("EntA")
CB = EntExtensionC:entity("EntB")
CC = EntExtensionC:entity("EntC")
CD = EntExtensionC:entity("EntD")
CE = EntExtensionC:entity("EntE")
CF = EntExtensionC:entity("EntF")
CG = EntExtensionC:entity("EntG")
CH = EntExtensionC:entity("EntH")
CI = EntExtensionC:entity("EntI")
CJ = EntExtensionC:entity("EntJ")
DA = EntExtensionD:entity("EntA")
DB = EntExtensionD:entity("EntB")
DC = EntExtensionD:entity("EntC")
DD = EntExtensionD:entity("EntD")
DE = EntExtensionD:entity("EntE")
DF = EntExtensionD:entity("EntF")
DG = EntExtensionD:entity("EntG")
DH = EntExtensionD:entity("EntH")
DI = EntExtensionD:entity("EntI")
DJ = EntExtensionD:entity("EntJ")
if(AA:health() > 0) {AA_N = 1}else {AA_N = 0}
if(AB:health() > 0) {AB_N = 1}else {AB_N = 0}
if(AC:health() > 0) {AC_N = 1}else {AC_N = 0}
if(AD:health() > 0) {AD_N = 1}else {AD_N = 0}
if(AE:health() > 0) {AE_N = 1}else {AE_N = 0}
if(AF:health() > 0) {AF_N = 1}else {AF_N = 0}
if(AG:health() > 0) {AG_N = 1}else {AG_N = 0}
if(AH:health() > 0) {AH_N = 1}else {AH_N = 0}
if(AI:health() > 0) {AI_N = 1}else {AI_N = 0}
if(AJ:health() > 0) {AJ_N = 1}else {AJ_N= 0}
if(BA:health() > 0) {BA_N = 1}else {BA_N = 0}
if(BB:health() > 0) {BB_N = 1}else {BB_N = 0}
if(BC:health() > 0) {BC_N = 1}else {BC_N = 0}
if(BD:health() > 0) {BD_N = 1}else {BD_N = 0}
if(BE:health() > 0) {BE_N = 1}else {BE_N = 0}
if(BF:health() > 0) {BF_N = 1}else {BF_N = 0}
if(BG:health() > 0) {BG_N = 1}else {BG_N = 0}
if(BH:health() > 0) {BH_N = 1}else {BH_N = 0}
if(BI:health() > 0) {BI_N = 1}else {BI_N = 0}
if(BJ:health() > 0) {BJ_N = 1}else {BJ_N= 0}
if(CA:health() > 0) {CA_N = 1}else {CA_N = 0}
if(CB:health() > 0) {CB_N = 1}else {CB_N = 0}
if(CC:health() > 0) {CC_N = 1}else {CC_N = 0}
if(CD:health() > 0) {CD_N = 1}else {CD_N = 0}
if(CE:health() > 0) {CE_N = 1}else {CE_N = 0}
if(CF:health() > 0) {CF_N = 1}else {CF_N = 0}
if(CG:health() > 0) {CG_N = 1}else {CG_N = 0}
if(CH:health() > 0) {CH_N = 1}else {CH_N = 0}
if(CI:health() > 0) {CI_N = 1}else {CI_N = 0}
if(CJ:health() > 0) {CJ_N = 1}else {CJ_N= 0}
if(DA:health() > 0) {DA_N = 1}else {DA_N = 0}
if(DB:health() > 0) {DB_N = 1}else {DB_N = 0}
if(DC:health() > 0) {DC_N = 1}else {DC_N = 0}
if(DD:health() > 0) {DD_N = 1}else {DD_N = 0}
if(DE:health() > 0) {DE_N = 1}else {DE_N = 0}
if(DF:health() > 0) {DF_N = 1}else {DF_N = 0}
if(DG:health() > 0) {DG_N = 1}else {DG_N = 0}
if(DH:health() > 0) {DH_N = 1}else {DH_N = 0}
if(DI:health() > 0) {DI_N = 1}else {DI_N = 0}
if(DJ:health() > 0) {DJ_N = 1}else {DJ_N= 0}
MaxA = (AA_N + AB_N + AC_N + AD_N + AE_N + AF_N + AG_N + AH_N + AI_N + AJ_N)
MaxB = (BA_N + BB_N + BC_N + BD_N + BE_N + BF_N + BG_N + BH_N + BI_N + BJ_N)
MaxC = (CA_N + CB_N + CC_N + CD_N + CE_N + CF_N + CG_N + CH_N + CI_N + CJ_N)
MaxD = (DA_N + DB_N + DC_N + DD_N + DE_N + DF_N + DG_N + DH_N + DI_N + DJ_N)
Max = (MaxA + MaxB + MaxC + MaxD)
Bookmarks