Breakeble Stuff=lights Out

NerosNeros 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-->

Comments

  • ChromeAngelChromeAngel Join Date: 2002-01-24 Member: 14Members, NS1 Playtester, Contributor
    Check out the lamps in Bast's marine spawn. Resetting everything at the start of a new round is probably the difficult bit.
  • NerosNeros Join Date: 2002-12-02 Member: 10398Members
    hmm...... okay... know there is two questions....

    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....
  • ndigondigo Join Date: 2003-05-05 Member: 16070Members
    edited May 2003
    <!--QuoteBegin--Neros+May 5 2003, 04:15 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Neros @ May 5 2003, 04:15 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> hmm...... okay... know there is two questions....

    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>
  • NerosNeros Join Date: 2002-12-02 Member: 10398Members
    well.... all other breakeble objects are reset.... arent they?
    So why shouldent this?
  • taledentaleden Join Date: 2003-04-06 Member: 15252Members, Constellation
    edited May 2003
    My impression would be that the hard part would be making sure the light was on at the end of the next round. The problem with switchable lights is that the only operation you have available is 'toggle' - have something target the light, it switches. There is no way (to my knowledge) to specifically tell a light 'be on, even if you already are'. Consequently, the problem comes down to two cases:

    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.
  • CageyCagey Ex-Unknown Worlds Programmer Join Date: 2002-11-15 Member: 8829Members, Retired Developer, NS1 Playtester, Constellation
    <!--QuoteBegin--taleden+May 5 2003, 09:20 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (taleden @ May 5 2003, 09:20 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->My impression would be that the hard part would be making sure the light was on at the end of the next round.  The problem with switchable lights is that the only operation you have available is 'toggle' - have something target the light, it switches.  There is no way (to my knowledge) to specifically tell a light 'be on, even if you already are'.  Consequently, the problem comes down to two cases:

    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...
  • NerdIIINerdIII Join Date: 2003-04-05 Member: 15230Members
    I think you are right Cagey. I also read this somewhere.
  • RPG_JssmfulhudRPG_Jssmfulhud Join Date: 2002-11-02 Member: 4006Members
    No offence buddy, i think it's great that you're mapping, but... If you don't know the basics, like targeting objects and entities, you really have nothing to do with NS mapping... Map some tutorial maps or experiment maps for Half-Life, see how everything works. Then map for a few years to get the hold of it and THEN try NS mapping...

    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-->
  • buggerbbbuggerbb Join Date: 2003-03-04 Member: 14296Members
    don't discourage mappers, everyone was saying the same thing to me when i started mapping back in march, and i know all the basics of NS mapping. It really isn't that hard, the differences with NS and CS is very small, and i learned on CS.

    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-->
  • CrouchingHamsterCrouchingHamster Join Date: 2002-08-17 Member: 1181Members
    I agree. It's not easy making NS maps, but it's not <i>that</i> different from other mods.

    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.
  • taledentaleden Join Date: 2003-04-06 Member: 15252Members, Constellation
    In all honesty, an intelligent person is not going to find it impossible to start mapping on NS as opposed to base Half-Life. I think a lot of NS mappers are like computer science majors (and I'm not afraid to say this because I consider myself a member of both groups) - they're very sure of themselves and what they know and the tricks they can pull, but this means that if you ask them a question about something they will often take that as a sign that you don't know as much as they do, and will respond by telling you that you don't know as much as they do instead of actually answering your question.

    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-->
  • wrongwaygobackwrongwaygoback Join Date: 2003-03-02 Member: 14237Members
    To be honest, once I've done ns_shattered it'll be my first map.
  • crodecrode Join Date: 2002-11-09 Member: 7876Members
    let get back on the topic people <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo--> I would really like to see this problem resolved because im having some troubles along this same problem.

    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.
  • Green_MeatGreen_Meat Join Date: 2002-11-06 Member: 7331Members
    OK, if you've got the light to go out, then you might try using a func_random with only one event in it. I've heard, but have not tested, that a func_random fires at the begining of each round reset. Unfortunately, I don't have anything else for you, because I've never tried it. If it's possible, then, the only major drawback that I can see would be that you would need an individual func_random for each light that can be blown out. Also, the map would need to determine if the light light HAD been blown out, or not. In that case you'd also need a master for the func_random that would prohibit the func_random from firing. so basicly, you have a shootable trigger that activates a multimanager. The MM in turn toggles two wall_toggles (one with light on, one with light off), a light, and a multisource. The multisource is the master for a func_random. The func_random triggers either the first MM so that the MM resets everything or you may need a second MM.

    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
  • Browser_ICEBrowser_ICE Join Date: 2002-11-04 Member: 6944Members
    Aren't lights using a targetname and a toogle option ?

    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 ?
  • ChromeAngelChromeAngel Join Date: 2002-01-24 Member: 14Members, NS1 Playtester, Contributor
    Here's how i'd do it (see attached). This way you'd need 1 relay, 1 light and 1 breakable for each breakable light (if all the relays have the same name you only need 1 trigger random). You might be able to get away with only 1 random and 1 relay if you add a multi_manager between the relay and the lights.
  • Green_MeatGreen_Meat Join Date: 2002-11-06 Member: 7331Members
    Hey, thats good thinking with the trigger relay - On only. I forgot all about that. That still leaves the trigger breakable broken after a round restart (unless it has the same name? would that cause an issue, with it triggering itself?). The on only does eliminate the need to detect the current state of the light, which will free up some entities (no need for a multisource), but I would still recommend going with a set of wall toggles and a shootable trigger to acomplish the "light on vs. Light broken" look. Simply winking out a light entitiy and leaving a "lit" texture behind might look kinda funny. That's just my opinion though.

    GSH
  • taledentaleden Join Date: 2003-04-06 Member: 15252Members, Constellation
    Well, making the light itself look right might not be all that hard. If you have two versions of a light texture, one intact and one broken, and set them up as +0 and +A, and then turn that brush into a switchable texture light, the texture should go from appearing intact to appearing broken automatically when you turn the light off. The only thing to make sure of would be that there is no way to turn the light off other than breaking it (a button that magically broke some glass would be weird), and that there is no way to turn it back on (a broken light fixture magically repairing itself would also be weird). As for the func_breakable itself resetting, I believe that is one of the entities that does properly reset at round change, but check the list to be sure. And if it isn't, its possible it will be in 1.1 - Flayra saw that list and commented that he'd try to get all the entities-not-resetting problems fixed in 1.1
  • ChromeAngelChromeAngel Join Date: 2002-01-24 Member: 14Members, NS1 Playtester, Contributor
    Apparently func_breakables resets properly so long as you don't check the break on touch flag ( I can't imagine those being used for breakable lights).

    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.
Sign In or Register to comment.