reapetable light question


(nikita) #1

i think it was allready asked 1nce i dont remember where or what 2 search thats the problem… but can i make light switch?

i guess if u can it will probebly combine a func_invisble_user
but with what 2 combine it…

anyone?


(carnage) #2

you can, i think there are two ways to do this, one with much better results than the other but lots more trouble

you can use dlights and control then via script

or (i odnt no if anyone has ever tried this) make two compies of the room in both lighitng conditions and switch them between each other with the switch, i would think this would would look better as dlight isnt that pretty


(nUllSkillZ) #3

I think that’s the right thread:
http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=8602&highlight=switch+light


(Ifurita) #4

Be warned, D-Lights come at a very high cost in FPS


(nikita) #5

yea but i still dont understand HOW to do it u know me allready… :smiley: i need very thick explemation or tutorial or something of what am i spose 2 do


(FireFly) #6

A dlight is nothing more than an entity. Like every entity you can turn them ON or OFF by scripting. In this case you would make the dlight entity visible / unvisible with the ‘setstate’ command.


(CooperHawkes) #7

iirc dlights can be triggered (alertentity)… no need to setstate…
anyway… I vote against the excessive usage of dlights, too :slight_smile:


(FireFly) #8

Both Ifurita and CooperHawkes are very, very right: For my “tramfight” map I orinally attached 3 dlights to my tram-model. this resulted into a decrease in FPS from 220 to 160! This was in devmap, so imagine what the result would be if there were 32 or 64 people online, airstrikes, smokegrenades & panzers (panzers use dlights ingame)…

For me this was THE reason to delete my dlights: So if you really need to use dlights in your map, my suggestion would be to use them only when really, really needed…


(nikita) #9

all the partyes saying that the light on or off no metter what way reduce fps dramaticly… i didnt know that i think ill pass… it looked like a good idea b4 i knew it
tnx anyway guys