spawned light sometimes dispaer

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Aprop
Major
Posts: 291
Joined: Mon Nov 17, 2008 3:40 pm

spawned light sometimes dispaer

Post by Aprop »

I have big problem, my spawned light sometimes hides when i change player view angles...... how can i spawn working light, i need it for lightswitch...?
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

You mean a dynamic light? They're a bitch to work with, extremely buggy (they're a dirty hack anyway), you'll need a lot of luck to get it right.

Try setting the entity that emits the light to alwaysdraw.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Aprop
Major
Posts: 291
Joined: Mon Nov 17, 2008 3:40 pm

Post by Aprop »

So my light-switch mod's dead?
Rookie One.pl wrote: Try setting the entity that emits the light to alwaysdraw.

I use script model dummy.tik, is that right?
How can i set entity to always drawn?
$smth surfaceparm alwaysdraw?
Or brush, by texture?
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

I'm not saying it's dead, I'm saying you'll need a lot of luck to get it right. Try moving the light-emitting entity a couple of units each direction. Stupid little things like this often help with dynamic lights.

And yes, it's $ent alwaysdraw.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Condor
Colour Sergeant
Posts: 82
Joined: Mon Apr 09, 2007 3:19 pm
Location: Bavaria (Germany)

Post by Condor »

You could create the lit up area twice as a script_object. One part, that is outside your level limits (not outside the world limits), is lit up by static lights while compiling the map, the other part is not lit up.
If you hit the lightswitch trigger, hide the dark script_object and move the lit up object to the place where the dark object was, if you turn off the light just reverse that process...
...waking up in the middle of the night with your hands covered in blood and you have no idea what happened.
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Yep, Condor here offered a very good solution to the problem. The other considerable pro is that you get high quality lighting (lightmaps).
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Post Reply