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


2 posters

    Exploding guards...

    avatar
    WLHack
    Senior Member
    Senior Member


    Male
    Number of posts : 800
    Age : 35
    Location : Finland
    Registration date : 2007-03-26

    Exploding guards... Empty Exploding guards...

    Post by WLHack Mon Mar 26, 2007 5:42 am

    Again one nifty code change...
    This time exploding guards (Like in Spear Resurrection and E.O.D)...

    First add exploding barrels using Zuljins tutorial (You can use
    any tutorial you want but I used this one, oh and remember
    to credit Paal, since I heard its originally his tutorial),
    it can be found from here http://clik.to/zrtc

    Then place the "A_BarrelAttack" at the beginning of WL_Act2.C
    so it looks like this:

    Code:

    / WL_ACT2.C

    #include "math.h"
    #include "WL_DEF.H"
    #pragma hdrstop

    void A_BarrelAttack (objtype *ob);

    /*

    Then search for "// dogs" (without the quotes)
    until you see this:

    Code:

    //
    // dogs
    //

    extern statetype s_dogpath1;
    extern statetype s_dogpath1s;

    -- and so on --

    Then edit that part to look like this:
    Code:

    extern  statetype s_dogpath1;
    extern  statetype s_dogpath1s;
    extern  statetype s_dogpath2;
    extern  statetype s_dogpath3;
    extern  statetype s_dogpath3s;
    extern  statetype s_dogpath4;

    extern  statetype s_dogjump1;
    extern  statetype s_dogjump2;
    extern  statetype s_dogjump3;
    extern  statetype s_dogjump4;
    extern  statetype s_dogjump5;

    extern  statetype s_dogchase1;
    extern  statetype s_dogchase1s;
    extern  statetype s_dogchase2;
    extern  statetype s_dogchase3;
    extern  statetype s_dogchase3s;
    extern  statetype s_dogchase4;

    extern  statetype s_dogdie1;
    extern  statetype s_dogdie1d;
    extern  statetype s_dogdie2;
    extern  statetype s_dogdie3;
    extern  statetype s_dogdead;

    statetype s_dogpath1    = {true,SPR_DOG_W1_1,20,T_Path,NULL,&s_dogpath1s};
    statetype s_dogpath1s  = {true,SPR_DOG_W1_1,5,NULL,NULL,&s_dogpath2};
    statetype s_dogpath2    = {true,SPR_DOG_W2_1,15,T_Path,NULL,&s_dogpath3};
    statetype s_dogpath3    = {true,SPR_DOG_W3_1,20,T_Path,NULL,&s_dogpath3s};
    statetype s_dogpath3s  = {true,SPR_DOG_W3_1,5,NULL,NULL,&s_dogpath4};
    statetype s_dogpath4    = {true,SPR_DOG_W4_1,15,T_Path,NULL,&s_dogpath1};

    statetype s_dogjump1  = {false,SPR_DOG_JUMP1,10,NULL,NULL,&s_dogjump2};
    statetype s_dogjump2  = {false,SPR_DOG_JUMP2,10,NULL,NULL,&s_dogjump3};
    statetype s_dogjump3  = {false,SPR_DOG_JUMP3,10,NULL,NULL,&s_dogjump4};
    statetype s_dogjump4  = {false,SPR_DOG_JUMP1,10,NULL,T_Bite,&s_dogdie1};

    statetype s_dogchase1  = {true,SPR_DOG_W1_1,10,T_DogChase,NULL,&s_dogchase1s};
    statetype s_dogchase1s  = {true,SPR_DOG_W1_1,3,NULL,NULL,&s_dogchase2};
    statetype s_dogchase2  = {true,SPR_DOG_W2_1,8,T_DogChase,NULL,&s_dogchase3};
    statetype s_dogchase3  = {true,SPR_DOG_W3_1,10,T_DogChase,NULL,&s_dogchase3s};
    statetype s_dogchase3s  = {true,SPR_DOG_W3_1,3,NULL,NULL,&s_dogchase4};
    statetype s_dogchase4  = {true,SPR_DOG_W4_1,8,T_DogChase,NULL,&s_dogchase1};

    statetype s_dogdie1  = {false,SPR_DOG_DIE_1,15,NULL,A_DeathScream,&s_dogdie2};
    statetype s_dogdie2  ={false,SPR_DOG_DIE_2,15,NULL,A_BarrelAttack,&s_dogdie3};
    statetype s_dogdie3  = {false,SPR_DOG_DIE_3,15,NULL,NULL,&s_dogdead};
    statetype s_dogdead  = {false,SPR_DOG_DEAD,130,NULL,NULL,&s_dogdead};

    Then go down to "T_Bite"-function and change it to this:
    Code:

    /*
    ===============
    =
    = T_Bite
    =
    ===============
    */

    void T_Bite (objtype *ob)
    {

      PlaySoundLocActor(DOGATTACKSND,ob);  // JAB
      KillActor (ob);
    }

    And suddenly you have changed the dog to a suicide bomber-wannabe.
    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

    Exploding guards... Empty Re: Exploding guards...

    Post by Dark_wizzie Mon Mar 26, 2007 2:58 pm

    that was quite long. but anyways, at first i was reading the topic, and im like..exploding mutants? but yes you can apply it to suicidal clones or flamethower guys



    Wolf3d Haven
    Minute Logic Blog

      Current date/time is Thu Nov 21, 2024 6:23 am