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 enemies drop certain things in certain levels

    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 enemies drop certain things in certain levels

    Post by Dark_wizzie on Sun Apr 29, 2007 1:45 pm

    dome




    Code Editing Tutorials
    Making boss drop certain things on certain levels





    Step 1: Open WL_STATE.C and do a search for "bossobj:"

    (no quotes)and you should see something like this:



    case bossobj:

    GivePoints (5000);

    NewState (ob,&s_bossdie1);

    PlaceItemType (bo_key1,tilex,tiley);

    break;




    Step 2: Now if you want the boss "Hans Grosse" to drop a gold key on every level except level 8, you change it so it looks like this:



    case bossobj:

    GivePoints (5000);

    NewState (ob,&s_bossdie1);

    if(gamestate.mapon == 7)//remember -1

    {

    }

    else

    {

    PlaceItemType (bo_key1,tilex,tiley);

    }

    break;




    Step 3: If you want him to drop an ammo clip on level 8 it would look like this:



    case bossobj:

    GivePoints (5000);

    NewState (ob,&s_bossdie1);

    if(gamestate.mapon == 7)//remember -1

    {

    PlaceItemType (bo_clip,tilex,tiley);

    }

    else

    {

    PlaceItemType (bo_key1,tilex,tiley);

    }

    break;



    Step 4: Compile and link up. NOTE: you can do this with the points too.






    Wolf3d Haven
    Minute Logic Blog

      Current date/time is Sat Dec 10, 2016 12:22 pm