Very Complex Mapping Question! Dare To Answer!

2

Comments

  • blackjackelblackjackel Join Date: 2002-11-01 Member: 2151Members, Constellation
    edited October 2003
    nothing is your bad, you are the mapping gurue, you have the ability to blame it on others, quite noble of you not to <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo-->





    uuh, i am confused, stateA cant have an initial or trigger state either because it is a multisource.... =/

    time for another diagram <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->




    Anyways i made a "secret room" within my map, how can i keep this from showing on the minimap?

    Also can i make a hologram of say... barney that rotates around?
  • CageyCagey Ex-Unknown Worlds Programmer Join Date: 2002-11-15 Member: 8829Members, Retired Developer, NS1 Playtester, Constellation
    <!--QuoteBegin--blackjackel+Oct 29 2003, 02:44 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (blackjackel @ Oct 29 2003, 02:44 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> uuh, i am confused, stateA cant have an initial or trigger state either because it is a multisource.... =/

    time for another diagram <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->
    <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    Wow, I'm in rare form today <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo-->

    Make sure to set gAtoggle's (not toggleA's) initial state to off and trigger state to toggle <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->

    --same diagram, correct instructions on the 3rd try <!--emo&???--><img src='http://www.unknownworlds.com/forums/html/emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif'><!--endemo-->

    <!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->
    Anyways i made a "secret room" within my map, how can i keep this from showing on the minimap?
    <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->

    Try using a NULL floor for the room and cover it with a func_illusionary brush that displays whatever floor texture you want to use. I know the 1.0x buildminimap command would leave NULL floors black, but I'm not sure about the 2.x version.

    <!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->
    Also can i make a hologram of say... barney that rotates around?
    <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->

    Hologram of barney yes, but I'm not sure how you'd do rotation. Hera's hologram spins, so there's probably a way to get the effect.
  • KageKage Join Date: 2002-11-01 Member: 2016Members
    The Hera sign's rotation is an animation of the model.
  • blackjackelblackjackel Join Date: 2002-11-01 Member: 2151Members, Constellation
    edited October 2003
    [QUOTE=XP-Cagey,Oct 29 2003, 01:56 AM] [QUOTE]

    <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
    5 multi_managers (pressedA, pressedB, toggleA, toggleB, gamestartedstatus) with flag 1 checked

    2 env_globals (gAtoggle,gBtoggle)
    2 multisources (stateA,stateB) with masters globalA & globalB

    2 trigger_multiples (stopA,stopB) with masters stateA & stateB

    2 trigger_randoms (cycleA,cycleB) with flag 2 checked
    2 env_shooters (shooterA, shooterB)
    2 ambient_generics (musicA, musicB)

    on A pressed:
    pressedA fires stopB
    ....stopB fires toggleB (if stateB = on)
    pressedA fires toggleA

    on B pressed:
    pressedB fires stopA
    ....stopA fires toggleA (if stateA = on)
    pressedB fires toggleB

    on toggleA fired:
    toggleA fires musicA
    toggleA fires cyclerA
    ....cyclerA fires shooterA every 2 seconds
    toggleA fires stateA

    on toggleB fired:
    toggleB fires musicB
    toggleB fires cyclerB
    ....cyclerB fires shooterB every 2 seconds
    toggleB fires stateB

    gamestartedstatus should fire stopA and stopB.<!--c2--></td></tr></table><span class='postcolor'><!--ec2--> [/QUOTE]
    Ok, I am still getting same effect (buttons dont deactivate the effects of the other buttons)


    and i think its because of stopA and stopB, you said to use trigger_multiples?

    Dont trigger_multiples activate when people pass through them or something?

    So far they look like regular brushes so i think they do something like that....

    I will try using other things in the meantime untill i get a reply from you

    I think what you meant was multisource i am trying that out right now....
  • blackjackelblackjackel Join Date: 2002-11-01 Member: 2151Members, Constellation
    edited October 2003
    while i was tinkering tyrying to fix this problem, i learned more of how this works and i think it should work, yes it should definately work, i think there was just some error you made in the explanation thats messing something up.....

    I took a look at the trigger_multiples (or whatever they should be)

    you sure you want the masters to be stateA and stateB and not globalA and globalB?



    I think the problem is somewhere in the stop toggle mechanism
  • blackjackelblackjackel Join Date: 2002-11-01 Member: 2151Members, Constellation
    edited October 2003
    so what entity would i need to make a hologram also?

    edit: scratch that i found out about the hologram,

    but i havent been able to get one button to turn off the effects of the other button yet.



    edit2: i believe i have found the problem, you mentioned two env_globals gAtoggle and gBtoggle in the setup but nowhere in the instructions... shouldnt they be used somewhere? I will attempt to use them somewhere to get this to work....
  • blackjackelblackjackel Join Date: 2002-11-01 Member: 2151Members, Constellation
    edited October 2003
    Here is what i have so far:

    -------------------------------------------------------------------------------------------
    2 multisource (stateA, stateB)

    State A properties:
    --------------------------
    Name: stateA
    Target: Gib1
    Global State Master: globalA

    StateB properties:
    ----------------------------
    Name: StateB
    Target: Gib2
    Global State Master: globalB

    -------------------------------------------------------------------------------------
    2 env_global (gAtoggle, gBtoggle)

    gAtoggle properties:
    ----------------------------
    triggermode: 3
    tinitial state: 0
    targetname: gAtoggle
    globalstate: globalA

    gBtoggle properties:
    -------------------------
    triggermode: 3
    initialstate: 0
    targetname: gBtoggle
    globalstate: globalB

    -------------------------------------------------------------------------------------

    2 trogger_multiple (stopA, stopB) <--- something fishy with using trigger_multiple please confirm

    stopA properties:
    ---------------------
    sounds: 0
    delay: 0
    wait: 10
    targetname: stopA
    master: globalA
    target: toggleA

    stopB properties:
    ----------------------
    sounds: 0
    delay: 0
    wait: 10
    targetname: stopB
    master: globalB
    target: toggleB

    ------------------------------------------------------------------------------

    2 func_button (buttonA, ButtonB)

    buttonA properties:
    ------------------------
    target: pressedA
    *everything else dosent matter

    buttonB properties:
    ------------------------
    target: pressedB
    *everything else dosent matter

    ------------------------------------------------------------------------------

    5 multi_manager (toggleA, toggleB, gamestartedstatus, pressedA, pressedB)

    toggleA properties:
    -----------------------

    angles: dosent matter
    teamchoice: 1
    targetname: toggleA
    musicA: 0
    cyclerA: 0
    stateA: 0


    toggleB properties:
    ----------------------

    angles: dosent matter
    teamchoice: 1
    targetname: toggleB
    musicB: 0
    cyclerB: 0
    stateB: 0

    gamestartedstatus properties:
    --------------------------------------

    angles: dosent matter
    teamchoice: 1
    targetname: gamestartedstatus
    stopA: 0
    stopB: 0

    pressedA properties:
    -------------------------

    angles: dosent matter
    teamchoice: 1
    targetname: pressedA
    stopB: 0
    toggleA: 0
  • CageyCagey Ex-Unknown Worlds Programmer Join Date: 2002-11-15 Member: 8829Members, Retired Developer, NS1 Playtester, Constellation
    edited October 2003
    <!--QuoteBegin--blackjackel+Oct 30 2003, 04:27 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (blackjackel @ Oct 30 2003, 04:27 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Here is what I have so far: <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    State A properties:
    --------------------------
    Name: stateA
    Target: Gib1 <-- <i>clear this out, you don't need it</i>
    Global State Master: globalA

    stopA properties:
    ---------------------
    sounds: 0
    delay: 0
    wait: 10 <-- change this to 0
    targetname: stopA
    master: globalA <-- <i>should be the stateA multisource, not the globalA variable</i>
    target: toggleA

    toggleA properties:
    -----------------------

    angles: dosent matter
    teamchoice: 1 <-- what's teamchoice for/why's it included?
    targetname: toggleA
    musicA: 0
    cyclerA: 0
    stateA: 0 <-- <i>should be gAtoggle env_variable, not the stateA multisource (this is where I screwed up my explanation)</i>

    Replace stateA with gAtoggle so that you're changing the state of the global variable when toggleA fires--right now it's always false, which is what's screwing up the logic (stopA and stopB never fire since the state is false). You need an entity for the trigger_multiple master; it doesn't know how to read the global variable; sticking the multisource in the master slot solves the problem.

    Check flag 2 on stopA and stopB so that players don't accidentally trigger them without pressing the buttons.

    EDIT: apostrophe overuse
  • blackjackelblackjackel Join Date: 2002-11-01 Member: 2151Members, Constellation
    I changed everything to how you wanted it to be..... and still no workey.....

    i am getting about ready to give up even after all this work, after you told me to check the flag so that people cant activate the trigger_multiples, i had an idea and left it on, what i found was suprising, i was able to fire the trigger_multipleA buy walking over it and songA and gibsA would stop....


    But this didnt work for songB and gibB, i confirmed EVERYTHING WAS EXACTLY THE SAME AS A, EVERYTHING, INCLUDING FLAGS....


    So i copied all entities from a and pasted to b and changed it and vice versa with no luck...



    Then i found something REALLY STRANGE...


    If i copied the toggleA multimanager and pasted it then renamed the original version to toggleA1 and used the new copy (toggleA) which should be the exact same thing and i tried triggering it again, DIDNT WORK!!!!

    Why wouldnt it work if i copied the exact thing toggleA and pasted then renamed the old one.... it should work, there is no difference....

    So maybe i thought this is a timing problem of the stuff within toggleA (even though everything is set to trigger immediately at 0, i think the engine determines random milliseconds to trigger stuff, so when you copy toggleA and paste the engine assinges another random times to it which stops it from working, i dunno this is my hypothesis.

    Otherwise i am completely stumped at why this does not work....
  • blackjackelblackjackel Join Date: 2002-11-01 Member: 2151Members, Constellation
    edited October 2003
    State A properties:
    --------------------------
    Name: stateA
    Target: Gib1 <-- cleared it out, didnt need it, like you said
    Global State Master: globalA

    stopA properties:
    ---------------------
    sounds: 0
    delay: 0
    wait: 10 <-- changed to 0, now can be triggered again instantly
    targetname: stopA
    master: globalA <-- changed to stateA
    target: toggleA

    toggleA properties:
    -----------------------

    angles: dosent matter
    teamchoice: 1 <-- This seems to be NEEDED, this is the reason it wasnt working before, it wont work without this (i dont know why)
    targetname: toggleA
    musicA: 0
    cyclerA: 0
    stateA: 0 <-- for some reason, if i change this to the recommended variable, or delete it, or to any other variable it stops working.

    And for what its worth, if i change ANYTHING IN THIS, it stops working, even if i change it and change it back, even if i copy and paste it then rename the origina, i dont know why, see explanation above.

    Also while leaving it at stateA i am getting the desired effect!!!! Yes i dont know why but when i leave this at stateA the music and envshooter turns off when stopA/B is triggered...



    So as the above was set, this is what happens when i walk ontop of stopA or stopB with the changes above (remember i did not change stateA)



    When i walk over stopA, music and shooters do not turn on (which is very good) same for if i walk over stop B


    If i trigger ButtonA (music and shooters fire) then i go over and trigger stopA the music and shooters stop!!! GREAT!!!

    But if i go over and trigger ButtonA then walk over stopB, nothing happens, so ONLY TURNING EFFECTS OFF only works once for some reason....

    Same results for buttonB












    Edit: i think the reason that the effects turning off only once because the globalwhatever is never turned off after stop is activated, so buttonA pushed global is turned on, if stopA is triggered global is never turned off so if you push buttonA then go back and do stopA again global is still on (never turned off) so it wont work....

    I think this calls for more entities. I am working on it some more...
  • CageyCagey Ex-Unknown Worlds Programmer Join Date: 2002-11-15 Member: 8829Members, Retired Developer, NS1 Playtester, Constellation
    <!--QuoteBegin--blackjackel+Oct 31 2003, 07:55 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (blackjackel @ Oct 31 2003, 07:55 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->Edit: i think the reason that the effects turning off only once  because the globalwhatever is never turned off after stop is activated, so buttonA pushed global is turned on, if stopA is triggered global is never turned off so if you push buttonA then go back and do stopA again global is still on (never turned off) so it wont work....

    I think this calls for more entities. I am working on it some more...<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    To get the simple only-off behavior you need, you must use a toggled global variable as multisource input instead of an entity OR use exactly one input entity AND fire the entity twice per loop. The setup I gave you was option #1, but that'll only work correctly if there's nothing targeting the multisource. If anything has its target set to stateA, stateA is broken.

    Your current setup breaks when you copy or edit because you're changing the inputs to the multisource:

    stateA = toggleA & toggleA1 & globalA = toggleA & (FALSE since it's never been called) & globalA = (FALSE); system doesn't work because master value is false

    Every item that targets the multisource becomes part of that multisource's input equation, so it's critical that you never use stateA as a target for any entity (its master should be the only thing it checks); remove it from toggleA and insert gAtoggle as I showed above. Delete all copies of the entities that you have made, even if you've changed the names. The only reference to stateA should be the master field of stopA; it will act broken otherwise.

    I'll be reinstalling Hammer this weekend; I might just give you a sample map with the proper entities.

    I'm concerned about the teamchoice value causing things to break--is there an entity named teamchoice in your map?
  • blackjackelblackjackel Join Date: 2002-11-01 Member: 2151Members, Constellation
    well for some reason, if i replace stateA with gAtoggle then the song/gibshooter wont even be toggled off when its supposed to
  • CageyCagey Ex-Unknown Worlds Programmer Join Date: 2002-11-15 Member: 8829Members, Retired Developer, NS1 Playtester, Constellation
    <!--QuoteBegin--blackjackel+Nov 3 2003, 03:34 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (blackjackel @ Nov 3 2003, 03:34 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->well for some reason, if i replace stateA with gAtoggle then the song/gibshooter wont even be toggled off when its supposed to<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    stateA called from toggleA will never, never work the way you want (I've stated it twice already, but here's the proof from the SDK):

    <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->// 1, How a multisource is fired:

    while (i < m_iTotal)
    {
     if (m_rgTriggered[i] == 0)
      break;
     i++;
    }

    if (i == m_iTotal)
    {
     if ( !m_globalstate || gGlobalState.EntityGetState( m_globalstate ) == GLOBAL_ON )
      return 1;
    }

    return 0;

    // 2, How a multisource is triggered:

    // CONSIDER: a Use input to the multisource always toggles.  Could check useType for ON/OFF/TOGGLE

    m_rgTriggered[i-1] ^= 1;<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->

    Like I said before, the behavior of a multisource garuntees that (1) all inputs are combined with a boolean AND, and (2) a multi_manager input is a toggle. Therefore, a multi_manager can never be used in combination with other inputs for a multisource unless the multi_manager is used an even number of times per intended cycle of the multisource, which breaks the other parts of the current system. Adding other inputs to the multisource (including additional inputs named "toggleA", which I checked as a possibility) won't fix it due to (1). No matter what you do, the test is going to fail on the even numbered calls. The behavior will look erratic because the system only uses the test part of the time and automatically shuts items off via the toggle during the rest.

    If you're set on using stateA as a trigger instead of exclusively as a master, you'll need to add more entities to the system: trigger it from a trigger_relay that is fired twice when toggleA fires - once directly, and once through a middleman entity since a multi_manager can't trigger an item twice.
  • blackjackelblackjackel Join Date: 2002-11-01 Member: 2151Members, Constellation
    no i want to do it your way, im just saying that if i replace stateA with gAtoggle then the music wont be toggled off as expected.
  • CageyCagey Ex-Unknown Worlds Programmer Join Date: 2002-11-15 Member: 8829Members, Retired Developer, NS1 Playtester, Constellation
    <!--QuoteBegin--blackjackel+Nov 3 2003, 01:08 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (blackjackel @ Nov 3 2003, 01:08 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> no i want to do it your way, im just saying that if i replace stateA with gAtoggle then the music wont be toggled off as expected. <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    Sorry about my misunderstanding <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->

    At this point, I think the quickest solution would be to just pass you a working map file--I'm not sure which settings are still off, but something isn't hooked up right. I've installed WC, and I'll post a working sample .map here sometime in the next 24 hours.

    Most likely I'll show a few different ways of doing it using a mastered multisource, triggered multisource and random, and triggered multisource and multi_manager loop. I expect mastered multisource to have the lowest overhead.

    After looking at the SDK, it appears that using trigger_multiple for stopA isn't going to work correctly because trigger_multiple doesn't include a Use function; a func_button might be necessary as a master for the global after all. It's not a problem if you place the button under the reachable player area and box it to keep it from throwing a leak error; I'll show how to do this in the sample map.
  • blackjackelblackjackel Join Date: 2002-11-01 Member: 2151Members, Constellation
    great, i cant wait to see what i did wrong, this is driving me crazy, thanks alot btw!
  • blackjackelblackjackel Join Date: 2002-11-01 Member: 2151Members, Constellation
    <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo--> Its been a week, i waited a week so i didnt seem too demaning... <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo-->
  • CageyCagey Ex-Unknown Worlds Programmer Join Date: 2002-11-15 Member: 8829Members, Retired Developer, NS1 Playtester, Constellation
    <!--QuoteBegin--blackjackel+Nov 10 2003, 02:56 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (blackjackel @ Nov 10 2003, 02:56 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo--> Its been a week, i waited a week so i didnt seem too demaning... <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo--> <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    Yeah -- you should have poked me with a stick or something earlier <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo-->

    I'll get that file to you tonight <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
  • CageyCagey Ex-Unknown Worlds Programmer Join Date: 2002-11-15 Member: 8829Members, Retired Developer, NS1 Playtester, Constellation
    edited November 2003
    Sorry I didn't get to it sooner -- this is the layout that I gave on the last page with one change -- the trigger_multiples have been replaced with null textured func_buttons that the player can't reach. I did this because it's not possible to fire a trigger_multiple from another entity. The zip includes the source (.rmf/.map) and the compiled .bsp that shows everything working. I also added a light and func_wall to indicate visually which items are on and when (in addition to the env_shooter firing).

    The room doesn't look like much/sound like much since I slapped it together this afternoon; it's not representative of what I'd release in a finished map.

    EDIT: just realized I used ns2.wad in the map, you can grab it from the n-s.org news page if you need to.
  • blackjackelblackjackel Join Date: 2002-11-01 Member: 2151Members, Constellation
    bravo! wow you went all out, you textured everything and added boxes and details and stuff, that would take me hours....

    you REALLY didnt have to go out of your way like that, you coulda slapped any textures on a square room and it woulda been ok with me...

    Next time, if there ever is a next time, dont go all out, please...

    Anyways great job! works like a charm! however you used func_switches for stopA and stopB, you had previously told me to use something else, not sure what it was, but it didnt work, and i even told you that i think the problem lies in stopA and stopB.





    Now the map i am making this for is a "fun map" where its not a serious map, its the remake of the original siege....


    I was thinking of adding a "jukebox" where players can press one button, the same button, and switch between songs (music in the form of Wavs or mp3s) that plays throughout the map....

    now i know how to make sounds as wavs, but not as mp3's and CERTAINLY not a button that switches between songs, so this is my next question, what entities would i need to accomplish this...
  • BigDBigD [OldF] Join Date: 2002-10-25 Member: 1596Members
    I gave that a download. Very neat piece of work! Sure wish there was a way to do logic in the half-life engine without so many entities though! As usual, great work cagey!
  • CageyCagey Ex-Unknown Worlds Programmer Join Date: 2002-11-15 Member: 8829Members, Retired Developer, NS1 Playtester, Constellation
    <!--QuoteBegin--blackjackel+Nov 14 2003, 03:00 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (blackjackel @ Nov 14 2003, 03:00 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->I was thinking of adding a "jukebox" where players can press one button, the same button, and switch between songs (music in the form of Wavs or mp3s) that plays throughout the map....

    now i know how to make sounds as wavs, but not as mp3's and CERTAINLY not a button that switches between songs, so this is my next question, what entities would i need to accomplish this...<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    Off the top of my head...

    For the individual mp3 files, look up <a href='http://natural-selection.org/Mapping_Guidelines.html#target_mp3audio' target='_blank'>target_mp3audio</a>. If you have trouble getting a file to play, search this board for solutions.

    For the music swapping, create a series of multi_managers:

    <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
    func_buttonMusic (originally targets multi_managerA)

    multi_managerA
    ...fires trigger_relayCoff
    ......turns off target_mp3audioC
    ...fires trigger_relayAon
    ......turns on target_mp3audioA
    ...fires trigger_changeTargetButtonToB
    ......changes func_buttonMusic's target to multi_managerB

    multi_managerA
    ...fires trigger_relayAoff
    ......turns off target_mp3audioA
    ...fires trigger_relayBon
    ......turns on target_mp3audioB
    ...fires trigger_changeTargetButtonToC
    ......changes func_buttonMusic's target to multi_managerC

    multi_managerC
    ...fires trigger_relayBoff
    ......turns off target_mp3audioB
    ...fires trigger_relayCon
    ......turns on target_mp3audioC
    ...fires trigger_changeTargetButtonToA
    ......changes func_buttonMusic's target to multi_managerA

    name another multi_manager gamestartedstatus and give it the following targets:
    trigger_relayAoff
    trigger_relayBoff
    trigger_relayCoff
    (optional) trigger_changeTargetButtonToA (if you want to always have the same song first)

    targeting gamestartedstatus from a button will give people the ability to turn the music off during the round.
    <!--c2--></td></tr></table><span class='postcolor'><!--ec2-->

    I'm not sure if target_mp3audio obeys on and off signals -- if it doesn't, you'll have to get back into the state management garbage the last solution used.
  • blackjackelblackjackel Join Date: 2002-11-01 Member: 2151Members, Constellation
    works perfect, i am using wavs as ambient generics...

    What if i wanted to randomize the music played?
  • CageyCagey Ex-Unknown Worlds Programmer Join Date: 2002-11-15 Member: 8829Members, Retired Developer, NS1 Playtester, Constellation
    <!--QuoteBegin--blackjackel+Nov 16 2003, 05:26 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (blackjackel @ Nov 16 2003, 05:26 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> works perfect, i am using wavs as ambient generics...

    What if i wanted to randomize the music played? <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    Remove the trigger changetargets and always use a nonlooping trigger random instead. You'll want to have each song's multimanager turn off all the other songs:

    <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
    func_buttonMusic (targets trigger_randomMusic)

    trigger_randomMusic targets multi_managerA, multi_managerB, multi_managerC

    multi_managerA
    ...fires trigger_relayBoff
    ......turns off target_mp3audioB
    ...fires trigger_relayCoff
    ......turns off target_mp3audioC
    ...fires trigger_relayAon
    ......turns on target_mp3audioA

    multi_managerA
    ...fires trigger_relayAoff
    ......turns off target_mp3audioA
    ...fires trigger_relayCoff
    ......turns off target_mp3audioC
    ...fires trigger_relayBon
    ......turns on target_mp3audioB

    multi_managerC
    ...fires trigger_relayAoff
    ......turns off target_mp3audioA
    ...fires trigger_relayBoff
    ......turns off target_mp3audioB
    ...fires trigger_relayCon
    ......turns on target_mp3audioC

    name another multi_manager gamestartedstatus and give it the following targets:
    trigger_relayAoff
    trigger_relayBoff
    trigger_relayCoff

    targeting gamestartedstatus from a button will give people the ability to turn the music off during the round.
    <!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
  • blackjackelblackjackel Join Date: 2002-11-01 Member: 2151Members, Constellation
    edited November 2003
    I dont see how that would work in the previous explanation details, you didnt provide any trigger randoms, perhaps you didnt understand me.

    It would be so that anytime someone hits a button, it would pick randomly from the 5 songs or whatever, then play the randomly picked music....


    Also, is there any chance the music can be individualized? for example, only the person to trigger the button can hear the music?


    And last but not least....

    I wanted to make it so that 2 buttons controll all this and that both buttons act as one, meaning if you push one its exactly as if you pushed the other, and vice versa, sorta like two entities working at once, is that possible?
  • CageyCagey Ex-Unknown Worlds Programmer Join Date: 2002-11-15 Member: 8829Members, Retired Developer, NS1 Playtester, Constellation
    edited November 2003
    <!--QuoteBegin--blackjackel+Nov 17 2003, 02:54 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (blackjackel @ Nov 17 2003, 02:54 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> I dont see how that would work in the previous explanation details, you didnt provide any trigger randoms, perhaps you didnt understand me. <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    Read it again, top two lines.

    <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->func_buttonMusic (targets trigger_randomMusic)

    trigger_randomMusic targets multi_managerA, multi_managerB, multi_managerC<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->

    Hopefully you'd infer that trigger_randomMusic would be a trigger_random since you knew that multi_managerC was a multi_manager in my last post. Don't loop trigger_randomMusic and you should be set.

    <!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->Also, is there any chance the music can be individualized? for example, only the person to trigger the button can hear the music?<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->

    Don't think so.

    EDIT: it might be possible using a game_zone_player, and it might be possible using a pair of game_team_masters as relays.

    <!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->And last but not least....

    I wanted to make it so that 2 buttons controll all this and that both buttons act as one, meaning if you push one its exactly as if you pushed the other, and vice versa, sorta like two entities working at once, is that possible?<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->

    If you want pushing either button to have the same effect, have them both target the same thing -- in this case, trigger_randomMusic.

    If you want to require pushing both at once to get the effect, you'll need to play with a multisource.
  • blackjackelblackjackel Join Date: 2002-11-01 Member: 2151Members, Constellation
    Not looping trigger_randommusic would be a problem.....


    You see, all the songs i have are loops, and are supposed to loop, otherwise they are like 5 second clips...

    So i would need a way to loop them and randomize them at the same time...







    For the buttons acting as one, i clicked on both (using ctrl) and did "to entity" and now they act as one button, but there is one problem, apparently i cann trigger the button from the front, i have to go to the sides to trigger it, very odd....,
  • blackjackelblackjackel Join Date: 2002-11-01 Member: 2151Members, Constellation
    Also, if i individualized the music, would it lag the server, or would that be a clientside thing?
  • CageyCagey Ex-Unknown Worlds Programmer Join Date: 2002-11-15 Member: 8829Members, Retired Developer, NS1 Playtester, Constellation
    <!--QuoteBegin--blackjackel+Nov 17 2003, 03:40 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (blackjackel @ Nov 17 2003, 03:40 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Not looping trigger_randommusic would be a problem.....


    You see, all the songs i have are loops, and are supposed to loop, otherwise they are like 5 second clips...

    So i would need a way to loop them and randomize them at the same time...







    <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    That's what looping the ambient_generic is for (which is the default behavior for an ambient_generic).

    Loop the sound at the sound entity, not at the trigger_random.

    <!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->For the buttons acting as one, i clicked on both (using ctrl) and did "to entity" and now they act as one button, but there is one problem, apparently i cann trigger the button from the front, i have to go to the sides to trigger it, very odd....,<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->

    I didn't mean make a single entity -- make 2 entities with the same target field value <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->

    <!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Also, if i individualized the music, would it lag the server, or would that be a clientside thing? <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->

    The sounds would only be played on the client; the logic to individualize them (assuming that it works) would put some additional strain on the server but I don't think enough to be noticable if the trick isn't being used for many different sets of buttons and sounds at the same time--2 buttons controlling 5 songs probably isn't an issue. 10 sets of 2 buttons controlling 10 sets of 5 songs might be.
  • blackjackelblackjackel Join Date: 2002-11-01 Member: 2151Members, Constellation
    Hey!

    just to give you an update...

    If you wanna see what you helped me out in doing go here:

    www.nsarmslab.com

    go to the downloads section and click on

    ns_siege005_006 (i am thinking of renaming to nsa_siege005

    And play the game, you will eventually see everythin you helped me out in doing.

    And i plan to give credits to everyone soon also.







    Well, I do have one problem, people are pushing the two readyroom buttons (the envshooter1 music1 and envshooter2 music2) buttons really fast and almost at the same time (i couldnt do that because i was only one person).

    Doing this messes everything up, how do i stop this from happening?
Sign In or Register to comment.