Wolf3d Haven Forum

Please log in or register. Smile
Wolf3d Haven Forum

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


    heartbeat sound (ramdom)

    Share

    Dark_wizzie
    I am Death Incarnate!
    I am Death Incarnate!

    Male
    Number of posts : 5090
    Age : 22
    Location : USA or Tawain
    Job : Student, Part time Cactuar fanatic
    Hobbie : Planting Cactuars.
    Message : I made this forum when I was 13 High on Drugs
    Registration date : 2007-03-24

    heartbeat sound (ramdom)

    Post by Dark_wizzie on 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 Thu Dec 08, 2016 6:16 am