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


    lighting effect

    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

    lighting effect

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

    from dome




    Code Editing Tutorials
    Adding a lighting effect




    Step 1.Open WL_ACT1.C and search for "light". Now you should find:

    {SPR_STAT_14}, // Ceiling light
    Change that to:
    {SPR_STAT_14, bo_light}, // Ceiling light


    Save and compile.Now open WL_DEF.H and search for "bo_". Now you should find at the bottom:

    bo_spear
    Change that to:


    bo_light
    Again, save and compile.
    Step 2: Open WL_AGENT.C and do a search for bo_gibs. You should find:


    case bo_gibs:
    if (gamestate.health >10)
    return;

    SD_PlaySound (SLURPIESND);
    HealSelf (1);
    break;


    Now, copy the entire case and paste it right below the break; of the bo_gibs case, like this:


    case bo_gibs:
    if (gamestate.health >10)
    return;

    SD_PlaySound (SLURPIESND);
    HealSelf (1);
    break;
    case bo_gibs:
    if (gamestate.health >10)
    return;

    SD_PlaySound (SLURPIESND);
    HealSelf (1);
    break;
    Now, change the last bo_gibs case to the following:


    case bo_light:
    StartBonusFlash ();


    Your code'll now look like this:

    case bo_gibs:
    if (gamestate.health >10)
    return;

    SD_PlaySound (SLURPIESND);
    HealSelf (1);
    break;

    case bo_light:
    StartBonusFlash ();


    That's it! Compile it all and link it up. You're all set with your lighting effect!




    Wolf3d Haven
    Minute Logic Blog

      Current date/time is Thu Dec 08, 2016 10:07 am