Breakeble Stuff=lights Out
Neros
Join Date: 2002-12-02 Member: 10398Members
<div class="IPBDescription">Is this possible</div> I wana make a objeckt that will turn off a light when it is destroyd.
I have been thinking that i could make the object, and light...
And make the light target the object.
Or make the object target the light.....
Or do i do it another way <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo-->
I have been thinking that i could make the object, and light...
And make the light target the object.
Or make the object target the light.....
Or do i do it another way <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo-->
Comments
1. How do i make the light go out when the object is destroyd?
2. How is it reset when the game is endet?
So it wasent just me going crazy when i saw the lights go out <!--emo&:0--><img src='http://www.unknownworlds.com/forums/html/emoticons/wow.gif' border='0' style='vertical-align:middle' alt='wow.gif'><!--endemo-->
I saw it ones, but i dident really take notice of it.... until after the game when i settled down abit and clean my teeth....
1. How do i make the light go out when the object is destroyd?
2. How is it reset when the game is endet?
So it wasent just me going crazy when i saw the lights go out <!--emo&:0--><img src='http://www.unknownworlds.com/forums/html/emoticons/wow.gif' border='0' style='vertical-align:middle' alt='wow.gif'><!--endemo-->
I saw it ones, but i dident really take notice of it.... until after the game when i settled down abit and clean my teeth.... <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
yup, 1. is possible... but this is without having VHE on, so maybe I'm explaining it wrong.
make a:
func_breakable
light
func_breakable = target on Break:light_1
light = name:light_1
[uhmm, now I'm getting confused, wait a sec while I map an example and compile...]
yup, this works, dunno if it resets every round though...
here is my example map...
<a href='http://edit.games-on.nl/ns_light_test.zip' target='_blank'>http://edit.games-on.nl/ns_light_test.zip</a>
So why shouldent this?
1. During the first round, the func_breakable is broken and the lights are turned off. At the beginning of the next round, they should be on.
2. During the first round, the func_breakable is NOT broken and the lights are NOT turned off. At the beginning of the next round, they should STILL be on.
Handling both of these cases in an elegant way would be tricky.. if you knew the lights were going to be off at the end of the round, you could give the light the "initially dark" flag (for the first round) and then have something target it at round start. However if they are not broken, then the round-start trigger would turn them OFF at the beginning of the next round, which is not what you want.
Of course, its possible that switchable lights alwayas revert to their original state at round change - i.e. dark if they have "initially dark" and bright otherwise - in which case you don't have to do anytyhing special except the func_breakable targeting the light like you said. There is a post around here somewhere listing the entities that reset and those that do not - I'll go take a look in a moment.
Edit: Just checked - light isn't listed, so you could do a test of your own (or I could.. in fact I think I will later tonight) to see whether it reverts to its initial state at round reset or if it remains in its current state.
1. During the first round, the func_breakable is broken and the lights are turned off. At the beginning of the next round, they should be on.
2. During the first round, the func_breakable is NOT broken and the lights are NOT turned off. At the beginning of the next round, they should STILL be on.
Handling both of these cases in an elegant way would be tricky.. if you knew the lights were going to be off at the end of the round, you could give the light the "initially dark" flag (for the first round) and then have something target it at round start. However if they are not broken, then the round-start trigger would turn them OFF at the beginning of the next round, which is not what you want.
Of course, its possible that switchable lights alwayas revert to their original state at round change - i.e. dark if they have "initially dark" and bright otherwise - in which case you don't have to do anytyhing special except the func_breakable targeting the light like you said. There is a post around here somewhere listing the entities that reset and those that do not - I'll go take a look in a moment.
Edit: Just checked - light isn't listed, so you could do a test of your own (or I could.. in fact I think I will later tonight) to see whether it reverts to its initial state at round reset or if it remains in its current state.<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
I could have sworn that trigger_relay set to forward the appropriate state signal allows you to turn a light explicitly on or off, but it's been a long, long time since I've built a state machine in a map...
I know i'm just making a bad mood, but it's so... I have been through it and still have problems sometimes... <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
Don't want to start an argument, but i think you should help mappers asking questions, not making posts to degrate and encouraging them to leave the comunity. No hard feelings though...
-Danish Monkey <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->
I was able to knock up a working, but ugly map within a couple of weeks, never having used Hammer before.
Now making a really good map, <i>that's</i> hard.. <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo-->
btw, VERC forums is an excellent place for mapping questions.
I'm sure NS mappers would love it if mapping for NS was so intricately difficult that their NS mapping abilities were somehow extremely rare and awe-inspiring, but this is simply not true.. and not to knock the good NS mappers out there, because I'm not going to argue that there is a tangible and visible difference between a really good NS mapper and someone who's just starting out, but don't act like it's brain surgery. That kind of attitude reminds me of my history classes, where ancient Priest castes would try to make the masses think they had some secret insight in order to maintain control, when in fact they just put on pretty robes.
So in conclusion, if somebody asks a civil, honest question, please give them a civil, honest answer. If they ask a rude, bitter question (which I have also seen here), then flame away, but try not to get high and mighty on people you don't know.
</rant>
<!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
I have a lighning strike, a toggle_wall and a light all targeted randomly at 2 locations. Ive done this giving all 3 objects the same name. (The toggle_wall is to freeze people while they are in the lghning strike <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo--> )
It all works except sometimes the light at the start of the game the light is in the wrong state . Initially dark doesnt fix it properly.... Also new rounds mess it up too.
The real point I'm driving at here is that there really isn't any way to get away with this without generating a huge number of entities. Maybe 6~10 per light that is shootable. With a cap on the number of entities, you will need to place these lights strategicly, and I would recommend that they look different from other lights around them so that players will know which ones to hit.
Good Luck and I hope this helps,
GSH
So if you had something triggering the light, like that func_breakable (haven't tested it but it sounds workable), then the light would turn off by being toogled off. Off course it would have to be ON at first.
Does it sound right ?
GSH
I'll add the list of entities that reset to the <a href='http://nsworld.ns-central.co.uk/mappingguide/MappingGuide.php' target='_blank'>QSG</a> sometime in the next couple of days.