DieHard Wolfers Forum Index DieHard Wolfers
A Wolfenstein 3d Fan Community


  Hosted by: MCS & Areyep.com - Designed by: BrotherTank

Original Yahoo Forum - Die Hard Archives

AReyeP HomepageAreyep Homepage DieHard Wolfenstein BunkerDieHard Wolfenstein Bunker Log inLog in RegisterRegister Banlist FAQFAQ Search ForumsSearch

  Username:    Password:      Remember me       

[Code] Blood Splatz Tutorial - Blood Splatters
Page 1 of 2 Goto page 1, 2  Next
DieHard Wolfers Forum Index -> Code Tutorials View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page BottomView Next Topic
Post new topicReply to topic
Author Message
Dugtrio17
Code Master
Code Master


Joined: 11 Mar 2003
Last Visit: 03 Oct 2013

Topics: 49
Posts: 903
Location: Seattle
usa.gif

PostPosted: Mon Apr 21, 2003 7:09 pm
   Subject: [Code] Blood Splatz Tutorial - Blood Splatters
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

OK, this isn't how to do the thing where a little pool of blood appears when you hurt an enemy, this is a real, DOOM-style blood splat. I've tested it from start to finish and I guarantee it works. If it doesn't, gimme a ring and I'll help ya out.
Okay, first open Wl_def.h and add the following lines below SPR_CHAINATK4 (or whatever your last sprite is). It should be somewhere right around line 468.
::: CODE :::
SPR_SPLAT1,SPR_SPLAT2,SPR_SPLAT3,

You may of course add more if you want more blood frames.
Next visit around line 526. Below rocketobj, type this:
::: CODE :::
splatobj,

Save that and close. Open Wl_act2.c and go to about line
213. Below #endif, type this:
::: CODE :::
extern  statetype s_splat1;
extern  statetype s_splat2;
extern  statetype s_splat3;

statetype s_splat1    =  {false,SPR_SPLAT1,12,NULL,NULL,&s_splat2};
statetype s_splat2    =  {false,SPR_SPLAT2,12,NULL,NULL,&s_splat3};
statetype s_splat3    =  {false,SPR_SPLAT3,12,NULL,NULL,NULL};


Make sure to extend it if you added more sprites. Also note you can change those 12's to make a frame of the splat longer or shorter. I find that 12 is a good value, though a bit short, and with the machinegun or chaingun it might look like it's just one frame stuck up there. 20 might be a good idea. Adjust as you please.

All done in that file. Save, compile, open Wl_state.c, and go to line 5. Below #pragma hdrstop, write this:
::: CODE :::
extern  statetype s_splat1 ;

Now go down to the DamageActor function around line 1017 (which, in the unmodified source, should be a } ). Right below the } below the last break, put this:
::: CODE :::
  {
   GetNewActor ();
   new->state = &s_splat1;
   new->ticcount = 1;

   new->tilex = ob->tilex;
   new->tiley = ob->tiley;
   new->x = ob->x;
   new->y = ob->y;
   new->obclass = splatobj;
   new->dir = nodir;
   new->angle = north;
   new->speed = 0;

   new-> flags = FL_NONMARK;
   new->active = true;
  }


And there you go! Click make, and now you have a little Doom-style blood splat every time an enemy gets damaged. You'll find that when the shot kills the enemy, no blood splat is issued. Well, I did this because I figured that there's already enough blood in death frames. Smile
I'll explain tomorrow what's going on in each step, but right now I've gotta go.

-DAD

@JLB: I got the sprites. They look great! I was going to PM you, but as I said, I'm in a hurry.

EDIT: November 19, 2004 Just fixed a bug which no one seemed to notice, though that's because the splat lacks direction, thus if I'm not mistaken the "directionalism" wouldn't have taken place. Still, it's a bug, so I fixed it. I left everything else intact, though, for nostalgia's sake.

_________________


Last edited by Dugtrio17 on Fri Nov 19, 2004 12:55 pm; edited 1 time in total
Guest




Last Visit:





PostPosted: Mon Apr 21, 2003 9:08 pm
   Subject: Re: Blood Splatz
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Dugtrio17 wrote:


@JLB: I got the sprites. They look great! I was going to PM you, but as I said, I'm in a hurry.



@DAD: I been working on graphics, Battlestein 3D Title and other are much better than before, You will need to change all background includes messages like pause, get psyched! and other to black.(changes in source code) Looks cool while statusbar matched with black which starts with white from bottom to black at top of statusbar. everything inside the box remain same. Almost 80% completed of graphics. few graphics left to be done,

You will love this thing when I ready to send you with new one. My few freinds already love that my project being upgrades and taking a LOT of changes, they're in Shocked and said "Holy Wow!" how you do that with graphics, and throght graphics were 16bit colors, I said to them "No, I was using 256 colors, because of palette changes" Rolling Eyes they were surprised.

@Trizzy Very Happy Very Specail Thank for bring me the information. Alots of graphics are new ones and some from SOD2 with modified. I can't do this without Paint Shot Pro Exclamation Exclamation Exclamation Laughing Razz
UberMutant
Guest



Last Visit:





PostPosted: Mon Apr 21, 2003 10:55 pm
   Subject: Re: [Code] Blood Splatz Tutorial - Blood Splatters
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Hey how bout sending me those bloodsplats.

I wanna check em out
Martin
I am Death Incarnate
I am Death Incarnate


Joined: 13 Mar 2003
Last Visit: 09 Sep 2014

Topics: 8
Posts: 152
Location: Wroclaw
poland.gif

PostPosted: Tue Apr 22, 2003 3:44 am
   Subject: Re: [Code] Blood Splatz Tutorial - Blood Splatters
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Add'em to Kreml.

Very Happy

_________________
Martin
Zach
DieHard Guard
DieHard Guard


Joined: 11 Mar 2003
Last Visit: 12 Dec 2015

Topics: 30
Posts: 258

blank.gif

PostPosted: Tue Apr 22, 2003 5:40 am
   Subject: Re: [Code] Blood Splatz Tutorial - Blood Splatters
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Let's give Dugtrio a round of applause! <applause>

That's awesome... so it's like whenyou shoot an enemy a little blood splattering sprite comes up? Very cool.

P.S. Why aren't you on AOL anymore? Sad
Guest




Last Visit:





PostPosted: Tue Apr 22, 2003 6:27 am
   Subject: Re: [Code] Blood Splatz Tutorial - Blood Splatters
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

@Dugtrio17: COOL Cool

Thanks for sharing this info with us. Smile

Perhaps in the future I shall expand the function so that there will be red blood-splats for the Nazis and purple blood-splats for the mutants. Different-colored blood-splattering was a little detail which id never implemented in Doom -- Knights and Barons of Hell should've bled green, Cacodemons should've bled blue, etc.
Dugtrio17
Code Master
Code Master


Joined: 11 Mar 2003
Last Visit: 03 Oct 2013

Topics: 49
Posts: 903
Location: Seattle
usa.gif

PostPosted: Tue Apr 22, 2003 9:37 am
   Subject: Re: [Code] Blood Splatz Tutorial - Blood Splatters
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Thanks to all for the praise Smile
I thought it up one day, and just gave it a try, and it worked.
@Martin: How many frames with that?
@Zach: Yeah I am! I never see YOU on anymore, though... Question
@WSJ: Yeah, with some if statements and extra blood objects, it would be very easy to expand it with different splats for different enemies. Also for a robotic enemy, you may not want blood splats to come up. Maybe sparks? Laughing
OK, for those who aren't sure what's going on in the tutorial and those new/inexperienced at coding, here's the awaited explaination...
In the first code-adding block: This is simple, you're just adding the sprites for the splats. As I stated, the more frames you want, the more sprites you have to add. Add these new sprites in FloEdit (or Wolfedit Very Happy ) as the next sprites.
In the second code-adding block: You're adding the object here. If you want different types of splats, add multiple objects. Don't forget to add the sprites, too.
In the third code-adding block: Here you're basically adding, well, what the splats do. You'll notice that at the end of each of the bottom strings, it has &s_splat#, with the # being the next sprite in line. That little part of the string tells the program what frame to display next. Look at the last string. It says NULL instead of &s_splat#. That makes the splat go bye-bye. You could use this to make an enemy that disappears, but here we use it to make sure the splats don't just kinda stay there after they finish. You could do that by setting that NULL to &s_splat3, but it would take up alot of actor slots REALLY fast*, especially if you shoot up an enemy with the chaingun. You could make it spawn a static object of blood on the floor instead, but I'll tell you about that later.
Okay, in the fourth code-adding block: Without this, you'll get an error about there being an undefined... thingy. You'll see you have to do the same thing in Poet's missile launcher tutorial.
In the final code-adding block: Last but not least is where we add the GetNewActor routine. I copied Giftmacher's T_GiftThrow (I think that's what it's called) just as a template. There's probably some extra stuff that you don't need in there, but I was in a hurry.
Well, there you go! The promised explaination! Smile
*About the Actor slots, there's a way to make the game not crash when you run out of actor slots. I forget the file because I don't have the code with me, but in one of the files, you'll find the GetNewActor routine. Where is says "If (!objlist)" (or something like that) and has below it a little crashing message like, "GetNewActor: No free spots in objlist!", change that line to "return;"
Okay, I've gotta go. Hope you all enjoy! Smile

_________________
Martin
I am Death Incarnate
I am Death Incarnate


Joined: 13 Mar 2003
Last Visit: 09 Sep 2014

Topics: 8
Posts: 152
Location: Wroclaw
poland.gif

PostPosted: Tue Apr 22, 2003 10:02 am
   Subject: Re: [Code] Blood Splatz Tutorial - Blood Splatters
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Yeah. It's awesome, DT! Yer really a wiz! Like MCS Mr Green

How many frames? How do U think?

_________________
Martin
Dugtrio17
Code Master
Code Master


Joined: 11 Mar 2003
Last Visit: 03 Oct 2013

Topics: 49
Posts: 903
Location: Seattle
usa.gif

PostPosted: Tue Apr 22, 2003 4:41 pm
   Subject: Re: [Code] Blood Splatz Tutorial - Blood Splatters
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

once again, I'm gonna put alotta @'s Laughing
@jamez: yeah, they disappear after the frames are through. If you want a little blood splat to spawn after the frames are through, just make a new A_ routine that spawns the sprite you want for the blood spot and stick it in the last frame of the splat. But only if you want to Razz
@zach: okay, okay, so I HAVEN'T been on in the past week. I've still got the same screen name, but the computer I've been using for the internet doesn't have AIM.
@martin: I'd say alot if we want it to look extra snazzy. Maybe... 7-9? Want to make it look smooth, you know, because now that I'm looking at it again, the 3 frame animation (well, at least with the wprites I whipped up real quick) does look a bit choppy...

_________________
Xarkon
DieHard Guard
DieHard Guard


Joined: 05 Jun 2003
Last Visit: 19 Apr 2006

Topics: 18
Posts: 203
Location: West Australia
australia.gif

PostPosted: Mon Sep 29, 2003 4:34 pm
   Subject: [Info] Blood Spatters - Bloody sprite?
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Can we put blood on the floor when a guard dies, I think they did it in the megademo for FE2, I want to do this! I wanna make a really bloody game!

Thanx! Cheesy Grin

_________________
Trying is the first step to failure
Raistlin
DieHard Guard
DieHard Guard


Joined: 22 Apr 2003
Last Visit: 18 Oct 2006

Topics: 24
Posts: 246

blank.gif

PostPosted: Mon Sep 29, 2003 5:29 pm
   Subject: Re: Bloody sprite?
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Do you mean, like, blood spattering off onto the floor when guards get hit? 'cos I think I have a tutorial on that.

Pizza Sports Car Cell Phone Computer Island/Holiday Umbrella Plane Dinner Raining Cake Black Sheep Thunderstorm

_________________
As I watched him on T.v, somehow it really bothered me...
Xarkon
DieHard Guard
DieHard Guard


Joined: 05 Jun 2003
Last Visit: 19 Apr 2006

Topics: 18
Posts: 203
Location: West Australia
australia.gif

PostPosted: Mon Sep 29, 2003 5:36 pm
   Subject: Re: Bloody sprite?
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Yeah, I think so! I dont really understand you! A blood sprite appears underneath the dead guy, yeah if thats wot U mean!
I want to have a bloody game!

Twisted Evil

_________________
Trying is the first step to failure
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 30 Oct 2017

Topics: 55
Posts: 2115
Location: Canada
blank.gif

PostPosted: Mon Sep 29, 2003 6:21 pm
   Subject: Red is the colour of love for the blood...
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

What about having it so the guy continuously drops blood for a few seconds after he's dead... and has a big puddle of it around him too? And make it so the shade of his uniform changes to more red as the blood is leaking through it! Than, if you walk over his dead body... blood blotches splatter onto your the game screen and you leave a trail of bloody footprints as you keep walking down the level. Maybe you can have it so mosquitos and bloodsuckers fly from inside the walls and feast on his rotten corpse too? And than after they do that, they can chase after you and try to suck your blood; where you can see them jumping onto the space on the bottom with B.J.'s face on it beside the health screen - than they eat all the numbers off the health meter too! Than they can come through the screen and start chasing after you while you're trying to type some message on DHW forums about bloody bloodsuckers full of blood and ---- huh? what's with all these pesky flies? AAA AAA AAA AAA aaa Aaaa AaaAAA!!!! Twisted Evil

*presses the Send button and runs away from the screen as fast as he can, screaming like a little girl who saw another little girl cut her arm while donating blood to red cross who's on her periods watching a horror movie and eating her steak extra rare*
Xarkon
DieHard Guard
DieHard Guard


Joined: 05 Jun 2003
Last Visit: 19 Apr 2006

Topics: 18
Posts: 203
Location: West Australia
australia.gif

PostPosted: Tue Oct 07, 2003 9:11 pm
   Subject: Re: Bloody sprite?
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

The pics might explain their post, but it doesn't explain my question! No chris, I know what U mean but no I dont want blood oozing onto the floor! I think what Raistlin said was right! I want like in the megademo for FE2, blood appears on the floor when the guard is shot dead. It looks pretty cool! Can U help me? Raistlin, can U show me that tutorial U have, It's probably the one Im looking 4! Thanx guys...

_________________
Trying is the first step to failure
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 30 Oct 2017

Topics: 55
Posts: 2115
Location: Canada
blank.gif

PostPosted: Sat Oct 11, 2003 7:19 am
   Subject: The complications of killing people just got scarier...
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I was just messing around with the source today (man, way too much fun!), and I think I accidently found what you're looking for while trying to create a gazilaquad of motion/perception tricks - lol. Here's the EXE file I just made, if you're interested. Smile

http://www.angelfire.com/id/choksta/zipped/weird33.zip

Well, from what I see; there's at least two ways to plug in new sprites:

PlaceItemType(sprite action,x,y); (in WL_ACT1.C)
SpawnNewObj (x,y,&line action); (in WL_STATE.C)

They both have their advantages. The first one detects for MAXSTATS before deciding whether it should add the object; but it relies on the first case of the action instead of the sprite number. The second one directs you to a statetype catalogue (where you can customize alot of ways the object will be handled/animated).

There's also a ton of places where you can plug either of these two object making functions into. Some that seem the most intelligent to me for this "blood" situation would be inside one of these two:

a line inside "case guardobj" of KillActor (WL_STATE.C)
the 2nd NULL in the s_grddie4 statetype (WL_ACT2.C)

As you'll notice, the first one is where the program gets the guard to drop ammo; and the second one is where the actual picture sequences are performed. There's a few other places it could be done (like in A_DeathScream of WL_ACT2.C, where it plays the sounds), but one of the two listed above would probably work better.

If you're going to use PlaceItemType, the sprite for the blood isn't accessible right away; but the one for the "Blood and Skeleton" is, and is called "bo_gibs". You can switch those two pictures around in the VSWAP to make things easier, or you can make a new type of action like "bo_gibs2" by adding a header, director, and action for it like this:

In WL_DEF.H, add this line below "bo_gibs,":

bo_gibs2,

In WL_AGENT.C, add this line below "case bo_gibs:"

case bo_gibs2:

In WL_ACT1.C, add this line below "{SPR_STAT_26,bo_clip2},"

{SPR_STAT_38,bo_gibs2},

To plug the PlaceItemType into "case guardobj" of KillActor of WL_STATE.C, you can just copy the old one and paste the new one under it; and than change the "bo_clip2" to whatever you picked, so the code will look something like this:

::: CODE :::
   case guardobj:
      GivePoints (100);
      NewState (ob,&s_grddie1);
      PlaceItemType (bo_clip2,tilex,tiley);
      PlaceItemType (bo_gibs,tilex,tiley);

      break;

If, instead, you want to throw your object maker into a special place of the guard's dying sequence of WL_ACT2.C; I'd recommend making a new function and statetype, and it would be a good idea to declare some headers for them near the top of the file (you can get away without putting them if you place everything exactly in sequence, but it doesn't hurt to have them anyways). So, lets say we put these two lines right after "void A_MechaSound(objtype *ob)":

void Show_Blood(objtype *ob);
extern statetype s_blood;


Now you're ready to create your blood prototypes. It doesn't really matter where we put these in WL_ACT2.C, as long as they're below the headers. The contents of Show_Blood() doesn't have to be that big (since you're only trying to display a picture in it), so you can get away with throwing in one line if you wish, like this (I put mine above the "SpawnFakeHitler()" function):

::: CODE :::
void Show_Blood (objtype *ob)
{
   SpawnNewObj (ob->tilex,ob->tiley,&s_blood);
}

You can also randomize it... so that the blood will only show at certain times, or on certain levels; by using an IF statement. Here's an example of a very simple one -- where the odds are 1 in 3 that the blood will drop, and the effect will only take place on every second level:

if (gamestate.TimeCount%3 == 1 && gamestate.mapon%2 == 1)

If you want to use PlaceItemType instead; you'll have to either make the "tilex" and "tiley" variables more global; or alter your line of code so that they can be used in combination with "ob->" switches; as displayed with the SpawnNewObject example.

It's now time to make your action. It doesn't really matter what you put in your statetype, since your object isn't going to DO anything; so just copy another statetype (preferably one from a dead guy), and paste it somewhere, like below the s_grddie4 one, and than change the pasted version to something like this:

statetype s_blood = {false,SPR_STAT_38,0,NULL,NULL,&s_blood};

This basically makes your picture display forever. Everything is set, so all you have to do is plug your Blood function into wherever you want blood to spurt out. Remember, the action is called Show_Blood and it goes into the second last variable of the statetype array. Here's a few examples of which frames you might want to put it into:

statetype s_grddie3 = {false,SPR_GRD_DIE_3,15,NULL,Show_Blood,&s_grddie4};
statetype s_ofcpain1 = {2,SPR_OFC_PAIN_2,10,NULL,Show_Blood,&s_ofcchase1};
statetype s_dogjump2 = {false,SPR_DOG_JUMP2,10,NULL,Show_Blood,&s_dogjump3};


I'm sure there's alot of other ways of getting blood to leak out of your humble victims, and it would be interesting to hear some other ideas; so feel free to share yours if you have any. Hope this helps man! Smile
Zombie_Plan
DieHard Wolfer
DieHard Wolfer


Joined: 12 Oct 2004
Last Visit: 07 Jun 2016

Topics: 101
Posts: 1614
Location: A hole in the wall
australia.gif

PostPosted: Thu Nov 18, 2004 10:19 pm
   Subject: How do you do this
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Playing Beyond Wolfenstein 2, I noticed how when you shot an enemy, he spilled a permanent pool of water on the ground. Does anyone know how to code this?

And how do you export single maps from MapEdit???

_________________
Zombieskittles

Welcome to 2016, where DHW still thinks it is okay to ban the world's most popular email service provider, and I can't have an avatar over 10kb
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 30 Oct 2017

Topics: 55
Posts: 2115
Location: Canada
blank.gif

PostPosted: Fri Nov 19, 2004 12:04 am
   Subject: I can answer in one letter!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

w
IanFranken
DieHard SS
DieHard SS


Joined: 26 May 2004
Last Visit: 15 May 2014

Topics: 27
Posts: 411
Location: Amerika
usa.gif

PostPosted: Fri Nov 19, 2004 12:09 am
   Subject: Re: How do you do this
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

To export a single map from MapEdit, press 'W' (for "Write") and enter a file name.

-Ian

_________________
"All you people of earth are idiots! Stupid! Stupid!" - Plan 9 From Outer Space
andy3012
DieHard Guard
DieHard Guard


Joined: 02 Jul 2004
Last Visit: 15 Feb 2008

Topics: 29
Posts: 292
Location: England
uk.gif

PostPosted: Fri Nov 19, 2004 9:00 am
   Subject: Re: How do you do this
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

for the pool of blood goto:
wl_state.c
and go to the kill actor function

now make sure that the coding is like this
::: CODE :::
   case guardobj:
             
      NewState (ob,&s_grddie1);
      GivePoints (100);
      PlaceItemType (bo_clip,tilex,tiley);
      PlaceItemType (bo_gibs,tilex,tiley);  //ADDED
      break;


Now if you compile and play you will get some bones and blood (instead of a normal pool) as there are two "bo_gibs"
so go into wl_act1.c, and go down till you get this:
::: CODE :::
{SPR_STAT_34,bo_gibs},         // gibs            "
{SPR_STAT_35,block},         // barrel          "
{SPR_STAT_36,block},         // well            "
{SPR_STAT_37,block},         // Empty well      "
{SPR_STAT_38,bo_gibs},         // Gibs 2          "


Remove the bo_gibs from SPR_STAT_34 (basically then one with //gibs) and leave SPR_STAT_38 as it is.
Save and compile and you got yourself blood...
Dugtrio17
Code Master
Code Master


Joined: 11 Mar 2003
Last Visit: 03 Oct 2013

Topics: 49
Posts: 903
Location: Seattle
usa.gif

PostPosted: Fri Nov 19, 2004 12:52 pm
   Subject: Re: I can answer in one letter!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Chris wrote:
w

Wow, I remember when I typed that. Looking at it now, I see a crucial error Embarassed Apparently, it doesn't show up in gameplay since the object has no direction, but it's something wrong, nonetheless.

_________________
Zombie_Plan
DieHard Wolfer
DieHard Wolfer


Joined: 12 Oct 2004
Last Visit: 07 Jun 2016

Topics: 101
Posts: 1614
Location: A hole in the wall
australia.gif

PostPosted: Sun Nov 21, 2004 4:29 pm
   Subject: Re: How do you do this
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Thanks Dugtrio.

I found that with an obivious code change, you can keep the bones as gibs AND still keep the blood effect.

You first go into WL_DEF.H and search for 'bo_gibs' . When there, type underneath bo_gibs (the code in red)
::: CODE :::
block,
   bo_gibs,
bo_gibs2,
   bo_alpo,
   bo_firstaid,
   bo_key1,


Then, go into AGENT.C and search for bo_gibs
underneath that section, retype the stats for bo_gibs, but change the name to bo_gibs2.
::: CODE :::
   case   bo_alpo:
      if (gamestate.health == 100)
         return;

      SD_PlaySound (HEALTH1SND);
      HealSelf (4);
      break;

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

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

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


Then, in ACT1.C, find {SPR_STAT_34,bo_gibs} and change it to {SPR_STAT_34,bo_gibs2}

::: CODE :::
{SPR_STAT_33,bo_fullheal},      // one up          "
{SPR_STAT_34,bo_gibs2},         // gibs            "
{SPR_STAT_35,block},         // barrel          "
{SPR_STAT_36,block},


Leave {SPR_STAT_38,bo_gibs} as is.

Now you have the blood and the skele/blood still gives health!

_________________
Zombieskittles

Welcome to 2016, where DHW still thinks it is okay to ban the world's most popular email service provider, and I can't have an avatar over 10kb
BrotherTank
Forum Administrator
<B>Forum Administrator</B>


Joined: 01 Mar 2003
Last Visit: 13 Sep 2017

Topics: 153
Posts: 2256
Location: Ontario
canada.gif

PostPosted: Sun Nov 21, 2004 5:48 pm
   Subject: Re: How do you do this
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Yep.. and you can save a few bytes of memory by doing:

::: CODE :::


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

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



No need to double up on the same lines of code, as it just eats memory... But it's just a suggestion.

Greg
BrotherTank
Zombie_Plan
DieHard Wolfer
DieHard Wolfer


Joined: 12 Oct 2004
Last Visit: 07 Jun 2016

Topics: 101
Posts: 1614
Location: A hole in the wall
australia.gif

PostPosted: Sun Nov 21, 2004 8:25 pm
   Subject: Re: How do you do this
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

yeh, I'm still learning, and I'm surprised I understand any of it.
I'm always cruising this forum for new tutorials and the like.

How did you create the windows on the doors in Wolfenstein Advanced???

_________________
Zombieskittles

Welcome to 2016, where DHW still thinks it is okay to ban the world's most popular email service provider, and I can't have an avatar over 10kb
WLHack
DieHard Wolfer
DieHard Wolfer


Joined: 10 Jul 2005
Last Visit: 29 Mar 2017

Topics: 65
Posts: 1237
Location: Loppi - Finland
finland.gif

PostPosted: Mon Aug 29, 2005 11:08 am
   Subject: Re: [Code] Blood Splatz Tutorial - Blood Splatters
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Is there any way to define which enemy has the blood splatter and which has not.
I am asking this because I think it is little strange that if you have added breakable
object and it has blood splatters too.
Zombie_Plan
DieHard Wolfer
DieHard Wolfer


Joined: 12 Oct 2004
Last Visit: 07 Jun 2016

Topics: 101
Posts: 1614
Location: A hole in the wall
australia.gif

PostPosted: Tue Aug 30, 2005 2:39 am
   Subject: Re: [Code] Blood Splatz Tutorial - Blood Splatters
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

WLHack wrote:
Is there any way to define which enemy has the blood splatter and which has not.
I am asking this because I think it is little strange that if you have added breakable
object and it has blood splatters too.


Breakable object? If ur talkin about the bonus thing, its so player can drink the blood, like in the original.
WLHack
DieHard Wolfer
DieHard Wolfer


Joined: 10 Jul 2005
Last Visit: 29 Mar 2017

Topics: 65
Posts: 1237
Location: Loppi - Finland
finland.gif

PostPosted: Tue Aug 30, 2005 5:27 am
   Subject: Re: [Code] Blood Splatz Tutorial - Blood Splatters
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I don't mean adding "bo_gibs" to some object, I mean the
Doom-like blood splatters that code was in the beginning of
the first page.
Born4battle
DieHard SS
DieHard SS


Joined: 24 Mar 2006
Last Visit: 21 Jun 2014

Topics: 37
Posts: 388
Location: Cherry Chocolate Reign!!!
usa.gif

PostPosted: Fri Dec 29, 2006 10:03 pm
   Subject: Re: [Code] Blood Splatz Tutorial - Blood Splatters
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Is there a way to splat on walls?, like changing the wall sprite when the actor is shot near it?

_________________
Thunderstorm "War is a conflict that does not determine who is right, but who is left." Thunderstorm
lwmxynedtodth
DieHard Officer
DieHard Officer


Joined: 28 May 2006
Last Visit: 22 Aug 2017

Topics: 38
Posts: 570
Location: Neverland
netherlands.gif

PostPosted: Sat Dec 30, 2006 12:00 pm
   Subject: Re: [Code] Blood Splatz Tutorial - Blood Splatters
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Adam Biser tried this once, but with a croppy effect. There is a 'wall sprites' tutorial, displaying several sprites on walls.
He tried to make a calculation to simulate blood splatting from ones back to the wall. Apparently, it didn't work. Feel free to complete it Very Happy.

http://diehardwolfers.areyep.com/viewtopic.php?t=2433&postdays=0&postorder=asc&&start=0

- lwmxynedtodth

_________________
lwmxynedtodth (portfolio, blog and more)
Killer-suit: Masterminds
On a MMORPG trip.
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 12 Dec 2017

Topics: 46
Posts: 2291
Location: USA
usa.gif

PostPosted: Sat Dec 30, 2006 6:54 pm
   Subject: Re: [Code] Blood Splatz Tutorial - Blood Splatters
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

lwmxynedtodth wrote:
Apparently, it didn't work. Feel free to complete it Very Happy.

It worked as far as I wanted to take it. Smile But yeah, feel free to complete it.

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
thellt
Bring 'em On
Bring 'em On


Joined: 21 Jan 2008
Last Visit: 12 May 2009

Topics: 11
Posts: 85
Location: bloodgulch
usa.gif

PostPosted: Mon Mar 03, 2008 12:06 pm
   Subject: Re: [Code] Blood Splatz Tutorial - Blood Splatters
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

does this include the final splat image staying on the screen or did i mess something up?

_________________
}{even or }{ellt?

look for helt3d
Display posts from previous:   
Post new topicReply to topic Time synchronized with the forum server time
DieHard Wolfers Forum Index -> Code Tutorials View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page TopView Next Topic
Page 1 of 2 Goto page 1, 2  Next
Jump to:  

Related topics
 Topics   Replies   Views   Last Post 
No new posts [Code] Display Different Ammo Types on Statusbar-BrotherTank
Author: BrotherTank
1 2381 Fri Feb 11, 2005 9:18 pm
Zombie_Plan View latest post
No new posts [Code] Adding a Frames per Second Counter - Darkone
Author: BrotherTank
0 1703 Sat Mar 13, 2004 2:07 pm
BrotherTank View latest post
No new posts [Code] Changing an Enemies Attack Strength - BrotherTank
Author: BrotherTank
0 1969 Tue Jan 27, 2004 10:29 am
BrotherTank View latest post
No new posts [Code] Changing Weapons -CheckWeaponChange- BrotherTank
Author: BrotherTank
2 2700 Sun Oct 26, 2003 1:21 am
Guest View latest post
No new posts [Help] Different Enemy Dying Frames/Views
Author: Guest
7 607 Tue Jul 29, 2003 3:00 pm
Codetech84 View latest post
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
   You cannot delete your posts in this forum
You cannot vote in polls in this forum


Copyright ©2003-2008 DieHard Wolfers
A Modified subBunker Theme by BrotherTank
Powered by phpBB © 2001, 2005 phpBB Group