2 posters
How to adding a Holy Cross in Wolf4SDL?
Officer-Michael John- Seasoned Wolfer
Number of posts : 332
Age : 26
Hobbie : Video and Wolf 3D mode making
Registration date : 2014-08-04
How to adding a Holy Cross in Wolf4SDL? Like it The Lost Relic! Very please helping for Me. I not good coding.
Officer-Michael John- Seasoned Wolfer
Number of posts : 332
Age : 26
Hobbie : Video and Wolf 3D mode making
Registration date : 2014-08-04
I like it a one good tutorial or source code.
linuxwolf- Bring em' On!
Number of posts : 160
Age : 42
Location : Australia
Hobbie : Games
Registration date : 2011-12-25
Can you let us know what you tried to do first?
Do you know about the big switch statement in wl_game.cpp?
Do you know about the big switch statement in wl_game.cpp?
Officer-Michael John- Seasoned Wolfer
Number of posts : 332
Age : 26
Hobbie : Video and Wolf 3D mode making
Registration date : 2014-08-04
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- Bring em' On!
Number of posts : 160
Age : 42
Location : Australia
Hobbie : Games
Registration date : 2011-12-25
I didn't play Lost Relic. Sorry. Can someone please elaborate on what OMJ is talking about?
Officer-Michael John- Seasoned Wolfer
Number of posts : 332
Age : 26
Hobbie : Video and Wolf 3D mode making
Registration date : 2014-08-04
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- Bring em' On!
Number of posts : 160
Age : 42
Location : Australia
Hobbie : Games
Registration date : 2011-12-25
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- Seasoned Wolfer
Number of posts : 332
Age : 26
Hobbie : Video and Wolf 3D mode making
Registration date : 2014-08-04
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- Bring em' On!
Number of posts : 160
Age : 42
Location : Australia
Hobbie : Games
Registration date : 2011-12-25
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.
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- Seasoned Wolfer
Number of posts : 332
Age : 26
Hobbie : Video and Wolf 3D mode making
Registration date : 2014-08-04
And how to I adding in WL_AGENT.CPP a two artifacts?
linuxwolf- Bring em' On!
Number of posts : 160
Age : 42
Location : Australia
Hobbie : Games
Registration date : 2011-12-25
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.
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- Seasoned Wolfer
Number of posts : 332
Age : 26
Hobbie : Video and Wolf 3D mode making
Registration date : 2014-08-04
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- Bring em' On!
Number of posts : 160
Age : 42
Location : Australia
Hobbie : Games
Registration date : 2011-12-25
How can I answer that without any code?
Officer-Michael John- Seasoned Wolfer
Number of posts : 332
Age : 26
Hobbie : Video and Wolf 3D mode making
Registration date : 2014-08-04
Here it is the code:
WL_DEF.H:
gamestate structure:
WL_AGENT.CPP:
GetBonus:
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- Bring em' On!
Number of posts : 160
Age : 42
Location : Australia
Hobbie : Games
Registration date : 2011-12-25
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- Seasoned Wolfer
Number of posts : 332
Age : 26
Hobbie : Video and Wolf 3D mode making
Registration date : 2014-08-04
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!
linuxwolf- Bring em' On!
Number of posts : 160
Age : 42
Location : Australia
Hobbie : Games
Registration date : 2011-12-25
You're welcome.
Officer-Michael John- Seasoned Wolfer
Number of posts : 332
Age : 26
Hobbie : Video and Wolf 3D mode making
Registration date : 2014-08-04
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.