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       

[Help] Different Enemy Dying Frames/Views
Page 1 of 1
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
Guest




Last Visit:





PostPosted: Wed Apr 02, 2003 1:10 pm
   Subject: [Help] Different Enemy Dying Frames/Views
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

Hi all! I want to know if anybody know how to do a second death sequence. Like when I shoot a guard with a Rocket Launcher, the guard explode instead of fall on the floor(like in Projekt Vertilgung). Answer pleeeeeaaaaase! Smile
Ripper
Code Master - Developer
Code Master - Developer


Joined: 15 Mar 2003
Last Visit: 30 Sep 2008

Topics: 21
Posts: 527
Location: Germany
blank.gif

PostPosted: Thu Apr 03, 2003 2:09 am
   Subject: Re: [Help] Different Enemy Dying Frames/Views
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

You could set a variable named i.e. "HitByRocket" to 1 before you call DamageActor in the RocketAttack function or what ever this function's called and set it back to 0 after that DamageActor call.
Then go to the KillActor function in WL_STATE.C and add a check at the right object class case. For example, if you wanted to give the guard an additional splatter death, you could write something like this:
::: CODE :::
   case guardobj:
      GivePoints (100);
      if(HitByRocket)
      {
         NewState (ob,&s_grdsplatter1);
         // oooohhh, the clip exploded, too ;) so no goodie here
      }
      else
      {
         NewState (ob,&s_grddie1);
         PlaceItemType (bo_clip2,tilex,tiley);
      }
      break;

Of course you'll gotta add those s_grdsplatter* states and write a new death sound function such as A_DeathSplatter.

Hope that helped Wink
Guest




Last Visit:





PostPosted: Thu Apr 03, 2003 9:01 am
   Subject: Re: [Help] Different Enemy Dying Frames/Views
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Oh...yeah. So I have to write a new function about "HitByRocket" and have to add the exploding frame in the game and add it in wl_act2.c is that right?
Ripper
Code Master - Developer
Code Master - Developer


Joined: 15 Mar 2003
Last Visit: 30 Sep 2008

Topics: 21
Posts: 527
Location: Germany
blank.gif

PostPosted: Fri Apr 04, 2003 12:41 am
   Subject: Re: [Help] Different Enemy Dying Frames/Views
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Yeah, something like this Wink
Read it again *gg*
"HitByRocket" is no function, but a variable, i.e. a BYTE.
So you'll gotta do this:
  • Add HitByRocket as a global variable
  • Set HitByRocket to 1 before DamageActor is called in your RocketAttack function (probably in WL_AGENT.C) and set it back to 0 after that function call
  • Change the KillActor function in WL_STATE.C so it shows another death frame set when killed by a rocket
  • Add splatter states to WL_ACT2.C
  • Add a new death sound function named i.e. A_DeathSplatter
This is nearly exactly the same as I wrote before.
Guest




Last Visit:





PostPosted: Fri Apr 04, 2003 5:02 am
   Subject: Re: [Help] Different Enemy Dying Frames/Views
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Yep ok I understand what I have to do now Wink Thanks!
Codetech84
Code Master
Code Master


Joined: 12 Mar 2003
Last Visit: 10 Sep 2019

Topics: 22
Posts: 1283
Location: Rauma - Finland
finland.gif

PostPosted: Mon Jul 28, 2003 5:09 am
   Subject: Re: [Help] Different Enemy Dying Frames/Views
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Ripper wrote:
You could set a variable named i.e. "HitByRocket" to 1 before you call DamageActor in the RocketAttack function or what ever this function's called and set it back to 0 after that DamageActor call.
Then go to the KillActor function in WL_STATE.C and add a check at the right object class case. For example, if you wanted to give the guard an additional splatter death, you could write something like this:
::: CODE :::
   case guardobj:
      GivePoints (100);
      if(HitByRocket)
      {
         NewState (ob,&s_grdsplatter1);
         // oooohhh, the clip exploded, too ;) so no goodie here
      }
      else
      {
         NewState (ob,&s_grddie1);
         PlaceItemType (bo_clip2,tilex,tiley);
      }
      break;

Of course you'll gotta add those s_grdsplatter* states and write a new death sound function such as A_DeathSplatter.

Hope that helped Wink


Another way to do it...

If guard takes enough damage he'd blow up...

:
::: CODE :::
   case guardobj:
      GivePoints (100);
      if(ob->hitpoints <= -100)
      {
         NewState (ob,&s_grdsplatter1);
         // oooohhh, the clip exploded, too ;) so no goodie here
      }
      else
      {
         NewState (ob,&s_grddie1);
         PlaceItemType (bo_clip2,tilex,tiley);
      }
      break;

_________________
Click here to visit KFH Games website!
*UPDATED* Spear of Destiny Reloaded
KFH Games on Facebook
Guest




Last Visit:





PostPosted: Mon Jul 28, 2003 3:47 pm
   Subject: Re: Need help on something...
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Hey cool!!!! I think I will do this by your way Codetech! Very Happy Very Happy Very Happy Very Happy Very Happy
Codetech84
Code Master
Code Master


Joined: 12 Mar 2003
Last Visit: 10 Sep 2019

Topics: 22
Posts: 1283
Location: Rauma - Finland
finland.gif

PostPosted: Tue Jul 29, 2003 3:00 pm
   Subject: Re: Need help on something...
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

The -100 there is just an example, change it according to the power of your weapons...

Glad I could help out...


Oh, btw dol you like my avatar? I did that for an old platformer I used to work on...

_________________
Click here to visit KFH Games website!
*UPDATED* Spear of Destiny Reloaded
KFH Games on Facebook
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 1
Jump to:  

Related topics
 Topics   Replies   Views   Last Post 
No new posts [Code] Different Door Sides - Ripper
Author: Ripper
1 2605 Tue Apr 19, 2011 7:00 pm
gerolf View latest post
No new posts [Code] Display Different Ammo Types on Statusbar-BrotherTank
Author: BrotherTank
1 3349 Fri Feb 11, 2005 9:18 pm
Zombie_Plan View latest post
No new posts [Code] Adding an Object that causes Damage - Chris
Author: Chris
4 2449 Sat Apr 24, 2004 7:53 pm
Guest View latest post
No new posts [Code] Adding a Frames per Second Counter - Darkone
Author: BrotherTank
0 2477 Sat Mar 13, 2004 2:07 pm
BrotherTank View latest post
No new posts [Info] Giving a Guard a Rocket Launcher
Author: Guest
4 197 Fri Jan 23, 2004 1:58 pm
Guest 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