We're having trouble with our torch turning on and off all lights

Me and a mate are making our own game and we’ve got a torch for the player and lamps spread across the map. We’re having trouble when we turn the torch on and off because when we turn the torch on, all the lamps in the map turn off and vice versa. How can we fix this?

Are you using the same material for the torch and the lamps? If so, are you editing the material directly to turn the torch on and off?