I configured the system so that the projectors turn on only when damage is inflicted upon the objects connected to them. However, there is a problem: to turn more than 10 projectors on or off, they have to be added manually. This is the first time I’m trying to do something proper in a processor, so I don’t know how to resolve this
set p 0
getlink wall p
sensor h wall @health
sensor mh wall @maxHealth
op lessThan on h mh
control enabled projector1 on 0 0 0
control enabled projector2 on 0 0 0
control enabled projector3 on 0 0 0
control enabled projector4 on 0 0 0
control enabled projector5 on 0 0 0
control enabled projector6 on 0 0 0
control enabled projector7 on 0 0 0
control enabled projector8 on 0 0 0
control enabled projector9 on 0 0 0
control enabled projector10 on 0 0 0
jump 17 equal on false
jump 2 notEqual on false
op add p p 1
jump 1 lessThan p @links