"WARNING: too many light style faces at XXX-XXX-XXX "

This is the compile log:

This is the error i get in compile, after the compile finishes and i load the map, the game crashes to desktop and says: “Engine Hunk Overflow”.

I digged into this and found out that the possible causes for this are: naming lights or having lights with effects like flickering and such.

What bothers me is that at those coordinates there isn’t a single light, and the brushes close to it are not big enough to reach lights somewhere else.

So what could be causing this? can a light halfway across the map cause this issue?

Thanks in advance!

Cheers

This might cause lights to have inverted brightness or just invalid brightness. Fix these errors, it’s possible you have some ‘infinite distance’ lights somewhere by accident.

Answer below:

No.

This error happens when there are too many styles lights casting on the same face. Examples of styles lights would be switchable lights, or lights that flicker, strobe, etc.

The maximum number of different light styles casting on a single face is four, including static lighting. So you could have one static light and three styles lights casting on the same face.

If you had like 20 static lights casting on the same face then there would be no issues besides everything may be excessively bright.

Thanks for the correction., I wrote that in a rush

It also has to do with colour. If you have a series of flickering lights, they’ll work fine, even if you have say 15 of them on the same surface. When you change the colour (1st-3rd value in _brightness) though, it considers it to be different. The intensity (4th value in _brightness) however can vary iirc from the wiki. I don’t remember if the ability to turn a light on/off matters (ie if you have more than 4 static lights all of which are different colours casting on the same face(s))

All lights have exactly the same color, some vary in intensity. All have the same name or no name at all.

The one that the player can switch off have a specific name, all others have no name and share the same colors.

Its really weird :s

Reset all of the lights to the default values and change them a few at a time until you run into the issue again, then fix the last changes you made so it doesn’t happen.

I would completely avoid using styles/switchable lights if possible because light cast from them doesn’t bounce and they look very bad if you don’t carefully manage the area around them to reduce the problems they cause.

You can try using light_dynamic which doesn’t have these limitations, but you still have problems to deal with. These types of lights are very expensive to render so you don’t want to use more than a few in the map, and the light tends to bleed through brushes so you can see it in adjacent rooms.