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


    lighting effect

    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

    lighting effect Empty lighting effect

    Post by Dark_wizzie 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 Tue Mar 19, 2024 2:42 am