Where am i?

I have created a room ,added movement and a function to enable lighting inside the room.(By pressing L i can enable/disable lighting).The problem is i want to be able to “turn on the lights” only when i am in a certain area inside my room.Now, no matter where i am i can enable lighting.
Any ideas ?

Well, you could keep track of the coordinates of the walls of your room, and only let L work if your coordinates are within the room’s…