Wolf3d Haven Forum

Please log in or register. Smile

Join the forum, it's quick and easy

Wolf3d Haven Forum

Please log in or register. Smile

Wolf3d Haven Forum

Would you like to react to this message? Create an account in a few clicks or log in to continue.
Wolf3d Haven Forum

A friendly Wolfenstein 3D community, about Wolfenstein 3D, the game that gave birth to first person shooters...


    ramdom door sounds

    Dark_wizzie
    Dark_wizzie
    I am Death Incarnate!
    I am Death Incarnate!


    Female
    Number of posts : 5120
    Age : 30
    Location : California, USA
    Job : Investor
    Hobbie : Computers, chess, computer chess, fashion, and philosophy
    Message : I made this forum when I was 13 High on Drugs
    Registration date : 2007-03-24

    ramdom door sounds Empty ramdom door sounds

    Post by Dark_wizzie Sun Apr 29, 2007 1:17 pm

    From dome
    Code Editing Tutorials
    Random door opening sounds




    With this you'll be able to control on which floor what sound is the door opening/closing sound. This is a new feature recently found out, so it's still unique to this site.

    Step 1. Open WL_ACT1.C and search for "SND". The first time you should find:
    //
    // play door sound if in a connected area
    //
    area = *(mapsegs[0] + farmapylookup[doorobjlist[door].tiley]
    +doorobjlist[door].tilex)-AREATILE;
    if (areabyplayer[area])
    {
    PlaySoundLocTile(CLOSEDOORSND,doorobjlist[door].tilex,doorobjlist[door].tiley); // JAB
    }


    Step 2. Change this to, for example:

    //
    // play door sound if in a connected area
    //
    area = *(mapsegs[0] + farmapylookup[doorobjlist[door].tiley]
    +doorobjlist[door].tilex)-AREATILE;
    if (areabyplayer[area])
    {
    if (gamestate.mapon >= 16) // anything above level 17 has the new sound
    PlaySoundLocTile(DOGBARKSND,doorobjlist[door].tilex,doorobjlist[door].tiley); // JAB
    else
    PlaySoundLocTile(CLOSEDOORSND,doorobjlist[door].tilex,doorobjlist[door].tiley); // JAB
    }
    Step 3. Now search for "SND" again. This time you find:
    ConnectAreas ();
    if (areabyplayer[area1])
    {
    PlaySoundLocTile(OPENDOORSND,doorobjlist[door].tilex,doorobjlist[door].tiley); // JAB
    }

    Step 4. Change this to, for example:


    ConnectAreas ();
    if (areabyplayer[area1])
    {
    if (gamestate.mapon >= 16)
    PlaySoundLocTile(DOGBARKSND,doorobjlist[door].tilex,doorobjlist[door].tiley); // JAB
    else
    PlaySoundLocTile(OPENDOORSND,doorobjlist[door].tilex,doorobjlist[door].tiley); // JAB
    }

    Step 5. Save and compile. Oh yeah, change the sounds you used too, or else the players starts wondering where that barking sound comes from...





    Wolf3d Haven
    Minute Logic Blog

      Current date/time is Thu Mar 28, 2024 1:55 pm