Hi,
I think you should set a Boolean that checks if a certain torch is on or off. Where you implement your ‘turning the torch on/off’ logic, set a Boolean to True for each torch you turned on (eg. isTorch1On, isTorch2On etc.). At your door/gate opening logic, just use an AND Gate (I think the node’s name is AND Boolean). You plug your ‘isTorchOn’ booleans into the AND Gate and it will only return true if all of the plugged in values are true. You check the output, and if it is true, the door/gate opens.
I hope I could help a bit.