Lighting question


(th0rn3) #1

Can I make something like a light switch whitch will turn on and off the light?


(kamikazee) #2

Yes and no.

It’s not possible to just make some conditional light which will light up the room and the player by merely linking the light entity to some switch.

However, people have found tricks with setposition to move lightmapped entities around, faking the effect. The player remains either lit or dark, unless some extra d-lights would be thrown in.


(th0rn3) #3

Well if i make a room, duplicate it, but this time make darker textures, make both script_movers and, and then just setstate em in script this would work, isnt it?


(murka) #4

for a setstate you wouldn’t need a script_mover but a func_static, but yes, thats basicly how you make switchable lights.


(th0rn3) #5

Oh, thanks


(Flippy) #6

Why not simply use a dlight?
I know you can only use a few of them, I know they will bring down framerate and I know people can turn them off via their configs but depending on your situation it might be the best I think.

If you are going to replace one room by another while people are in it you should be very aware that strange things can happen, people getting stuck in the rooms, etc etc. ET is not built for that kind of behaviour.
You can try it, but just know that you might getr weird results.


(Wezelkrozum) #7

How people can’t stuck:
make the first room with a light, duplicate it and retexture the brushes with darker textures.
And now the trick! Duplicate it again and give all the duplicated brushes the cliptexture.


(th0rn3) #8

Nice with clipping suggestion :smiley: