creating a removable light-blocking box

  • If you're asking a question make sure to set the thread type to be a question!

Bob Ross

L3: Member
Jun 16, 2009
105
9
i am trying to create a visual indicator of how many times a team has capped the intel. i want to do this using a set of three lights on either base and have one light up each time the intel is capped. currently i have it set up so that each light has an individual name. thats six named lights. obviously it wreaks havoc on performance.

i am wondering if there is a way to set up an invisibble light-proof box that can be removed from the map or moved into the wall on cap so that the light appears to be turning on. a func_detail with a blocklight texture can block the light but it has no inputs or parent capability. ive tried func_wall and func_brush and neither of them can block the light for whatever reason. does anyone know what i can do to acheive the desired results?
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
Why don't you just use glow lights/sprites which don't cast light/shadows onto walls? Do you really have to make the lights that bright, versus being just a light on a computer console? Toss on an env_lightglow to make them visible from a distance...
 
Last edited:

Tapp

L10: Glamorous Member
Jan 26, 2009
776
215
You could probably create a prop_dynamic on top of it, set it to not render or collide, and see if that works. Otherwise, I'd say that you could simply use fiddle with the env_sprite until you get it working.
 

MoonQuake

L3: Member
Jul 18, 2009
111
21
Unless your map already has major performance issues, I don't see why having 6 lights that turn on and off is a problem. Especially if they're in a small, remote and enclosed room like the spawn rooms.

Wouldn't bother with performance.
As long as players clearly understand what's you're trying to communicate.
You could even use light models from the library and switch their skin from 1 to 0 at the same time you turn the actual lights on and off, so it looks like they really turn on and off. That'd look great!
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
I think it's worth pointing out that six named lights in one room will not allow VRAD to run since it would generate too many possible lightmaps on a surface. Unless of course their brightness/cutoff is really short (and you have high res lightmaps), in which case the env_sprite method would end up looking pretty much the same.
 

MoonQuake

L3: Member
Jul 18, 2009
111
21
He's got 3 switchable lights per spawn room + maybe another non-switchable so it should be fine.

You gotta trust VRAD, it can handle more than meets the eye. Worst thing that can happen is a crash or maybe some weird lightmaps but that's it. :)
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
No, you can have a maximum of 6 different "styles" of light on any given face. 3 independently switched lights in one area will result in 8 styles. (I had misread as there being 6 lights in one place, but even so it's still over the limit with 3)
 

MoonQuake

L3: Member
Jul 18, 2009
111
21
I'm just saying that this number is a "safe" number.
You can use more than that and all this can do is give you an error message when you compile and generate problematic lightmaps which can be fixed most of the time... up to a certain logical limit. :)

It's safer to stay below 6, it's possible to go above 6.
 

Bob Ross

L3: Member
Jun 16, 2009
105
9
the lights arent in the spawn rooms theyre on the outside of the bases. think 2fort with three lights under the sniper windows on each side. except probably about 30% less far apart.
 

MoonQuake

L3: Member
Jul 18, 2009
111
21
I see.
So d'you need it to look like traffic lights that turn on and off?
You want the light emitted on the wall as an indicator or can it just be a shape or texture?

Got a screenshot? :)
 

MoonQuake

L3: Member
Jul 18, 2009
111
21
Oh, any textured view from hammer or in-game. The easiest for you.
Would be clearer if it was in-game though.
 

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
I would seriously recommend the sprite method. Impact on performance and compile time will be negligable, and they arn't dependant on light nor cast light/shadows. They are pretty visible from any distance (provided you use reasonable scales) so if your env_glow technique isn't working, this is your logical solution.

If you really don't want to use sprites then you need to spend time tweaking your env_glow's via trial and error until you do find something you're happy with.

Anything else is a masochistic waste of time. There's really no need to be fancy about this.