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] Make BJ Hurt Sound when Hit
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
BrotherTank
Forum Administrator
<B>Forum Administrator</B>


Joined: 01 Mar 2003
Last Visit: 13 Sep 2017

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

PostPosted: Fri Sep 24, 2004 4:19 pm
   Subject: [Code] Make BJ Hurt Sound when Hit
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

JackaL wrote:
does anyone know if this has been done? or how to do it. my idea is that when B.J. is starting to get low on health, say, under 40%. everytime he gets shot, he makes an "ouch" sound, like a little scream noise you put in the game. I reckon it could be good. Cool


Easy... locate the TakeDamage routine... (wl_agent.c) and add one line:

if (gamestate.health <= yourvaluehere) SD_PlaySound (YOURSOUNDNAME);

For that matter, you could easily just have BJ yelp each time he gets hit... so just add the:

SD_PlaySound (YOURSOUNDNAME);

to the TakeDamage routine...

Greg
BrotherTank

@Steinthug: Lets not do that - If you have the answer and want to share... do so... don't do this "Do you think I was going to tell you... "

BrotherTank
Forums Admin
JackaL
DieHard SS
DieHard SS


Joined: 25 Jun 2004
Last Visit: 04 Apr 2011

Topics: 30
Posts: 335
Location: Rotorua, New Zealand
newzealand.gif

PostPosted: Thu Oct 07, 2004 10:24 pm
   Subject: Re: [Code] Make BJ Hurt Sound when Hit
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

hey, my idea has been put here! how cool is that! it gave me a bit more knowledge on how to code, thanks BrotherTank!
Zombie_Plan
DieHard Wolfer
DieHard Wolfer


Joined: 12 Oct 2004
Last Visit: 1:08 ago.

Topics: 108
Posts: 1711
Location: A hole in the wall
australia.gif

PostPosted: Sun Nov 21, 2004 10:41 pm
   Subject: Re: [Code] Make BJ Hurt Sound when Hit
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Um, can you emphasize (I hope I spelled that correctly!) as my game terminates everytime it hits 40 and under (I set the health that he screams to under 40).

_________________
WolfSource - Your news source since the beginning of time (2019)
BrotherTank
Forum Administrator
<B>Forum Administrator</B>


Joined: 01 Mar 2003
Last Visit: 13 Sep 2017

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

PostPosted: Mon Nov 22, 2004 7:20 am
   Subject: Re: [Code] Make BJ Hurt Sound when Hit
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Yep... I bet you followed the tutorial to the letter... Did you use the sound name "YOURSOUNDNAME" ?? If so, try using TAKEDAMAGESND until you insert a sound of your own liking into the vswap.

Greg
BrotherTank
Zombie_Plan
DieHard Wolfer
DieHard Wolfer


Joined: 12 Oct 2004
Last Visit: 1:08 ago.

Topics: 108
Posts: 1711
Location: A hole in the wall
australia.gif

PostPosted: Wed Nov 24, 2004 1:55 am
   Subject: Re: [Code] Make BJ Hurt Sound when Hit
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

No I didn't. I'm not that stupid.

I even went through the tutorial supplied in Flo-edit to add the sound you hear when you press LIM in SOD2:SR. I called it HURTBJSND and placed that in your tutorial.

_________________
WolfSource - Your news source since the beginning of time (2019)
BrotherTank
Forum Administrator
<B>Forum Administrator</B>


Joined: 01 Mar 2003
Last Visit: 13 Sep 2017

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

PostPosted: Wed Nov 24, 2004 6:33 am
   Subject: Re: [Code] Make BJ Hurt Sound when Hit
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Deathshead wrote:
No I didn't. I'm not that stupid.

I even went through the tutorial supplied in Flo-edit to add the sound you hear when you press LIM in SOD2:SR. I called it HURTBJSND and placed that in your tutorial.


LOL... You never know... so you have to ask. All I can say is that it works perfect here. You are adding 1 line and 1 line only, so it shouldn't be doing that to your game unless it can't find the sound that it is looking for...

In this case... you used "HURTBJSND".... which is an added sound. Try using "TAKEDAMAGESND" which is already in the game (and was to be used for this purpose originally).... If it works, then you have done something wrong in installing your new sound as the engine can't find it.

Greg
BrotherTank
Dugtrio17
Code Master
Code Master


Joined: 11 Mar 2003
Last Visit: 03 Oct 2013

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

PostPosted: Wed Nov 24, 2004 7:41 am
   Subject: Re: [Code] Make BJ Hurt Sound when Hit
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

If you used Flo's tutorial to add sounds, then the sound'll likely be uncached, thus the game will bomb out with an error message.
MCS has a tutorial at AReyeP.com, I believe.

_________________
Zombie_Plan
DieHard Wolfer
DieHard Wolfer


Joined: 12 Oct 2004
Last Visit: 1:08 ago.

Topics: 108
Posts: 1711
Location: A hole in the wall
australia.gif

PostPosted: Thu Nov 25, 2004 10:23 pm
   Subject: Re: [Code] Make BJ Hurt Sound when Hit
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

hmm, Your both obviously right. Razz

TAKEDAMAGESND works and I did use the FloEdit tutorials.

_________________
WolfSource - Your news source since the beginning of time (2019)
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] Blood Splatz Tutorial - Blood Splatters
Author: Dugtrio17
45 16608 Tue Mar 11, 2008 12:02 am
AlumiuN View latest post
No new posts [Code] Display Different Ammo Types on Statusbar-BrotherTank
Author: BrotherTank
1 3270 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 2408 Sat Mar 13, 2004 2:07 pm
BrotherTank View latest post
No new posts [Code] Changing an Enemies Attack Strength - BrotherTank
Author: BrotherTank
0 2707 Tue Jan 27, 2004 10:29 am
BrotherTank View latest post
No new posts [Code] Changing Weapons -CheckWeaponChange- BrotherTank
Author: BrotherTank
2 3620 Sun Oct 26, 2003 1:21 am
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