Making entities dissapear for all rounds to come?

Like such as the NIPPER
Post Reply
burnone2
Posts: 7
Joined: Tue Mar 22, 2011 5:06 pm

Making entities dissapear for all rounds to come?

Post by burnone2 » Tue Mar 29, 2011 2:29 am

Hey guys me again, back with a question regarding this new map that I'm making. I want there to be breakable lights, and I want them to not be lit up the next round if they get shot out. I'm not sure that this is possible, but it would really make my work in progress map very dynamic. If any of you could please tell me whether or not this is possible, and if it can be applied to all entities. Thank you.
User avatar
ehlohel
that's why they call me Mr. Fahrenheit
<b><i>that's why they call me Mr. Fahrenheit</i></b>
Posts: 836
Joined: Sun Nov 22, 2009 4:24 pm
Location: arghhh

Re: Making entities dissapear for all rounds to come?

Post by ehlohel » Tue Mar 29, 2011 3:05 pm

I don't think it is. Why would you want this?
Image
User avatar
NIPPER
Posts: 10684
Joined: Tue Mar 19, 2002 9:49 pm
Contact:

Re: Making entities dissapear for all rounds to come?

Post by NIPPER » Tue Mar 29, 2011 4:30 pm

you might as well make them all dark, people will shoot them all out first round for sure
burnone2
Posts: 7
Joined: Tue Mar 22, 2011 5:06 pm

Re: Making entities dissapear for all rounds to come?

Post by burnone2 » Tue Mar 29, 2011 4:54 pm

Well this is going to be about a 1/2 square mile map of apartments consisting of 112 seperate rooms as well as street lights, I'm estimating somewhere in the neighborhood of 400 light entities around the entire map. My idea behind it is that if the map begins as a decently well-lit map the gameplay will change round by round as it inevitably becomes darker and darker as more and more lights are shot out. In addition there are going to be locks on the doors that can be shot off, so it will become clear which rooms have been occupied thusfar. My idea behind it is that the map dynamically changes throughout it's life on the server, and no round is ever the same as the last, which requires different variables in the gameplay.
User avatar
NIPPER
Posts: 10684
Joined: Tue Mar 19, 2002 9:49 pm
Contact:

Re: Making entities dissapear for all rounds to come?

Post by NIPPER » Tue Mar 29, 2011 6:04 pm

As far as whether or not it's possible I don't know, I can't think of any way to do it anyway.

That's an awful lot of lights, it's going to take forever to compile if it even compiles at all.
User avatar
Avvatar
Veni. Legi. Docuit, inportuna.
Posts: 10183
Joined: Fri Feb 21, 2003 3:58 am
Location: San Jose

Re: Making entities dissapear for all rounds to come?

Post by Avvatar » Tue Mar 29, 2011 7:03 pm

Yeah, that's not going to compile.

Here, I even did the research for you because I couldn't remember the limit.
http://developer.valvesoftware.com/wiki ... e_Lighting
Switchable lights are the same as static lights in that they use lightmap information compiled during RAD. A light is set as being switchable by one of three things such as giving it a name, giving it a style, or giving it a pattern. Regular lights that don't support dynamic effects are the lights generally used as switchable lights, this includes lights like light, and light_spot but not light_environment. Switchable lights use a set of two lightmaps on and off. Switchable lights alternate or blend between the two lightmaps, this allows partial brightness while keeping it to just two lightmaps. This gives all the benefits of the static lighting but allows it to change and be partially dynamic. Say you have two switchable lights shining on the same face, how many lightmaps are needed?
Light 1 & 2 ON
Light 1 ON, 2 OFF
Light 1 OFF, 2 ON
Light 1 & 2 OFF
That's four states in total. You add a third switchable light and it goes up to eight lightmaps. Here becomes the problem with switchable lights, it becomes expensive in lightmaps to create all the possible states. So expensive in fact that there is a hard-coded limit that means you can only have two switchable lights affecting the same face. There is a slight solution though, the lights with identical names will all be given the same lightmap, so you can have 50 switchable lights with the same name shining on the same face; however, you cannot have more than 32 light source names. . Because of the extra lightmaps switchable lights use it increases the amount of time it takes RAD to run, increases file size, and also uses up system resources when it alternates between them; however, a switchable light sat in one state or the other, has little or no more effect than a static light.
And the answer is: you can only have two switchable lights affecting any one surface. Not to mention you can't have more than 32 switchable lights total.
Image
burnone2
Posts: 7
Joined: Tue Mar 22, 2011 5:06 pm

Re: Making entities dissapear for all rounds to come?

Post by burnone2 » Wed Mar 30, 2011 8:51 am

Aw damn that puts a damper on my map big time, looks like I need a new engine!

Thanks for all the help yall, you're all just a wealth of knowledge!
Hopefully I'll figure out some sort of compromise, I'll post it somewhere around here once I get it to a working state.

Thanks again!
Post Reply