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


    heartbeat sound (ramdom)

    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

    heartbeat sound (ramdom) Empty heartbeat sound (ramdom)

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

    from dome
    Code Editing Tutorials
    Adding a heartbeat sound




    Step 1.Open WL_PLAY.C and search for "funny face". Now you should find:

    //
    // MAKE FUNNY FACE IF BJ DOESN'T MOVE FOR AWHILE
    //
    #ifdef SPEAR
    funnyticount += tics;
    if (funnyticount > 30l*70)
    {
    funnyticount = 0;
    StatusDrawPic (17,4,BJWAITING1PIC+(US_RndT()&1));
    facecount = 0;
    }
    #endif


    Step 2. Change this all to the following(copy paste). Then save and compile.

    //
    // PLAY HEARTBEAT SOUND IF HEALTH IS BELOW 51%
    //
    #ifndef SPEAR
    if (gamestate.health<51)
    {
    funnyticount += tics;
    if (funnyticount > 30l*3) // heartbeat speed -- change to your liking
    {
    funnyticount = 0;
    SD_PlaySound (HEARTBEATSND);
    }
    }
    #endif





    Wolf3d Haven
    Minute Logic Blog

      Current date/time is Fri Nov 08, 2024 6:50 am