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


    making chainggun jam randomly

    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

    making chainggun jam randomly

    Post by Dark_wizzie on 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 Sun Dec 04, 2016 4:12 am