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


    making chainggun jam randomly

    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

    making chainggun jam randomly Empty making chainggun jam randomly

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

    dome
    Code Editing Tutorials
    Making the chaingun jam at random time





    Step 1: Open WL_AGENT.C and do a search for "change frame and fire" (no quotes and include the spaces) Scroll down to here:



    case 4:

    if(!gamestate.ammo)

    break;



    Add this under "break;" (ahh! no quotes)



    if (US_RndT()<8)

    {

    if (US_RndT()<24)

    {

    SD_PlaySound(YOURSOUNDSND);// choose a sound

    buttonstate[bt_attack] = false;

    // IN_ClearKeysDown ();

    gamestate.attackframe = gamestate.weaponframe = 0;

    gamestate.bestweapon = gamestate.chosenweapon = gamestate.weapon = wp_machinegun;

    DrawWeapon ();

    break;

    }

    else if (buttonstate[bt_attack])

    {

    gamestate.attackframe -= 2;

    }

    }

    else if (buttonstate[bt_attack])

    {

    gamestate.attackframe -= 2;

    }



    Step 2: MAKE SURE there are only 2 "else if (buttonstate[bt_attack])

    {

    gamestate.attackframe -= 2;" OK?




    Compile and link up! Now have fun with that jamming chaingun! NOTE: Don't expect the chaingun to jam every 2 minutes, it may take a long time to jam. Please if any errors, email me at
    [email]Wolf3dkyle@aol.com[/email] and i will try to figure out the problem. Thanks!




    Wolf3d Haven
    Minute Logic Blog

      Current date/time is Fri Apr 26, 2024 5:49 am