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

    How to adding a Holy Cross in Wolf4SDL?

    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    wolf4sdl - How to adding a Holy Cross in Wolf4SDL? Empty How to adding a Holy Cross in Wolf4SDL?

    Post by Officer-Michael John Sat Jan 16, 2016 6:22 am

    How to adding a Holy Cross in Wolf4SDL? Like it The Lost Relic! Very please helping for Me. I not good coding.
    avatar
    Guest
    Guest


    wolf4sdl - How to adding a Holy Cross in Wolf4SDL? Empty Re: How to adding a Holy Cross in Wolf4SDL?

    Post by Guest Sat Jan 16, 2016 8:33 am

    http://www.learncpp.com/
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    wolf4sdl - How to adding a Holy Cross in Wolf4SDL? Empty Re: How to adding a Holy Cross in Wolf4SDL?

    Post by Officer-Michael John Sat Jan 16, 2016 9:30 pm

    I like it a one good tutorial or source code.
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    wolf4sdl - How to adding a Holy Cross in Wolf4SDL? Empty Re: How to adding a Holy Cross in Wolf4SDL?

    Post by linuxwolf Sat Jan 16, 2016 9:55 pm

    Can you let us know what you tried to do first?

    Do you know about the big switch statement in wl_game.cpp?
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    wolf4sdl - How to adding a Holy Cross in Wolf4SDL? Empty Re: How to adding a Holy Cross in Wolf4SDL?

    Post by Officer-Michael John Sat Jan 16, 2016 10:01 pm

    I like in The Lost Relic,that you picked up a Holy Cross and you go for DeathArtifact with Holy Cross and you don‘t dead. Lost Death artifact and Holy Cross.
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    wolf4sdl - How to adding a Holy Cross in Wolf4SDL? Empty Re: How to adding a Holy Cross in Wolf4SDL?

    Post by linuxwolf Sun Jan 17, 2016 12:22 am

    I didn't play Lost Relic. Sorry. Can someone please elaborate on what OMJ is talking about?
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    wolf4sdl - How to adding a Holy Cross in Wolf4SDL? Empty Re: How to adding a Holy Cross in Wolf4SDL?

    Post by Officer-Michael John Sun Jan 17, 2016 12:37 am

    I like it https://www.youtube.com/watch?v=n7IIQHPt86Y&feature=youtube_gdata_player (My The Lost Relic video). Holy Cross on 8:53 minute and Death Artifact 9:25 minute and I removed a Death Artifact with Holy Cross. But I don‘t know,that how to adding.
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    wolf4sdl - How to adding a Holy Cross in Wolf4SDL? Empty Re: How to adding a Holy Cross in Wolf4SDL?

    Post by linuxwolf Sun Jan 17, 2016 12:56 am

    I'm still not sure what the holy cross and death artifact actually do. Does holy cross give you health? Death artifact makes you give a lot of damage? Please specify your requirements as I didn't play The Lost Relic yet.
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    wolf4sdl - How to adding a Holy Cross in Wolf4SDL? Empty Re: How to adding a Holy Cross in Wolf4SDL?

    Post by Officer-Michael John Sun Jan 17, 2016 1:02 am

    A Death artifact damage than in Spear:Resurrection. Holy Cross not give health,but protect from Death Artifact and if you picked a Holy Cross with this you don‘t know dead from Death Artifact.
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    wolf4sdl - How to adding a Holy Cross in Wolf4SDL? Empty Re: How to adding a Holy Cross in Wolf4SDL?

    Post by linuxwolf Sun Jan 17, 2016 2:32 am

    I see. Holy cross makes you immune from Death Artifact damage but Death Artifact remains in effect otherwise.

    You need to code in two bonus items. One is holy cross. Other is death artifact. Have you done this part yet?

    Look at wl_game.cpp big switch statement. Also update statinfo[] array in wl_act1.cpp with the new bonus items. Add bo_holycross and bo_deathartifact to enumeration type wl_stat_t in wl_def.h.
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    wolf4sdl - How to adding a Holy Cross in Wolf4SDL? Empty Re: How to adding a Holy Cross in Wolf4SDL?

    Post by Officer-Michael John Sun Jan 17, 2016 3:15 am

    And how to I adding in WL_AGENT.CPP a two artifacts?
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    wolf4sdl - How to adding a Holy Cross in Wolf4SDL? Empty Re: How to adding a Holy Cross in Wolf4SDL?

    Post by linuxwolf Sun Jan 17, 2016 7:02 am

    When you pick up the bonus items you will set some new state variable in gamestate structure. Then in wl_agent.cpp update T_Player() to monitor these new state variables and act on them accordingly.

    Do you know what T_Player() does? It is the think function for player object. Every object in wolf3d has a think function which runs every frame. Please study engine code before adding features.
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    wolf4sdl - How to adding a Holy Cross in Wolf4SDL? Empty Re: How to adding a Holy Cross in Wolf4SDL?

    Post by Officer-Michael John Tue Jan 19, 2016 11:16 am

    I added a two item in my mod and not working the Holy Cross. But the Death artifact in good working. Why not working the Holy cross than in The Lost Relic?!
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    wolf4sdl - How to adding a Holy Cross in Wolf4SDL? Empty Re: How to adding a Holy Cross in Wolf4SDL?

    Post by linuxwolf Tue Jan 19, 2016 2:18 pm

    How can I answer that without any code?
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    wolf4sdl - How to adding a Holy Cross in Wolf4SDL? Empty Re: How to adding a Holy Cross in Wolf4SDL?

    Post by Officer-Michael John Wed Jan 20, 2016 12:56 am

    Here it is the code:

    WL_DEF.H:

    gamestate structure:

    Code:
        short      death;
        short      hcross;

    WL_AGENT.CPP:

    GetBonus:

    Code:
          case bo_death:
                if (!gamestate.hcross) {
                    SD_PlaySound(TAKEDAMAGESND);
                    GetMessage("You lose a Holy cross!");
                    SD_PlaySound(TAKEDAMAGESND);
                gamestate.hcross = 0;   
                GetMessage("You lose a Last holy cross!");
                    gamestate.health = 0;
                    DrawHealth();
                    DrawFace();
                    playstate = ex_died;
                } else
                    SD_PlaySound(PLAYERDEATHSND);
                GetMessage("You dead!");   
                break; 
               
          case bo_hcross:
                if (!gamestate.death) {
                    SD_PlaySound(TAKEDAMAGESND);
                    DrawHealth();
                    DrawFace();
                    } else
                SD_PlaySound(BONUS4SND);
                GetMessage("Holy cross");
                break;
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    wolf4sdl - How to adding a Holy Cross in Wolf4SDL? Empty Re: How to adding a Holy Cross in Wolf4SDL?

    Post by linuxwolf Wed Jan 20, 2016 3:56 am

    I'm not entirely sure what you want these objects to do, but here's my version:

    Code:
          case bo_death:
                if (gamestate.hcross > 0)
                {
                    gamestate.hcross--;
                    if (gamestate.hcross == 0)
                    {
                        GetMessage("You lose a Last holy cross!");
                    }
                    else
                    {
                        GetMessage("You lose a Holy cross!");
                    }
                }
                else
                {
                    gamestate.health = 0;
                    DrawHealth();
                    DrawFace();
                    playstate = ex_died;
                    GetMessage("You dead!");    
                }
                gamestate.death++;
                break;  
                
           case bo_hcross:
                SD_PlaySound(BONUS4SND);
                GetMessage("Holy cross");
                gamestate.hcross++;
                break;
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    wolf4sdl - How to adding a Holy Cross in Wolf4SDL? Empty Re: How to adding a Holy Cross in Wolf4SDL?

    Post by Officer-Michael John Thu Jan 21, 2016 12:14 am

    If you step for Death artifact with Holy cross. You don't die only you lose a Holy cross and lost the Death articaft. Big thanks LinuxWolf moderator a you version!  Smile
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    wolf4sdl - How to adding a Holy Cross in Wolf4SDL? Empty Re: How to adding a Holy Cross in Wolf4SDL?

    Post by linuxwolf Thu Jan 21, 2016 12:20 am

    You're welcome.
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    wolf4sdl - How to adding a Holy Cross in Wolf4SDL? Empty Re: How to adding a Holy Cross in Wolf4SDL?

    Post by Officer-Michael John Sat Jul 23, 2016 10:26 am

    I love adding, that if I am in God mode then I don't know deading from Death artifact. If i not pick up a Holy Cross. How to doing? I try already, but don't worked.

    Sponsored content


    wolf4sdl - How to adding a Holy Cross in Wolf4SDL? Empty Re: How to adding a Holy Cross in Wolf4SDL?

    Post by Sponsored content


      Current date/time is Fri Apr 19, 2024 9:06 am