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       

[Info] Silent Gun? - Adding a Silencer
Page 1 of 1
DieHard Wolfers Forum Index -> Code Crackers 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: Thu Apr 17, 2003 9:40 pm
   Subject: [Info] Silent Gun? - Adding a Silencer
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

Thanks BrotherTank for all your help(all work perfectly) But do you know how to do a Silent Weapon??
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: Thu Apr 17, 2003 9:53 pm
   Subject: Re: Silent Gun?
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

DemolitionDerby wrote:
Thanks BrotherTank for all your help(all work perfectly) But do you know how to do a Silent Weapon??


Yep.... You would create a silencer object and if you had it you could edit in the wl_agent.c file, the sub routine :

Void GunAttack (objtype *ob)

and look for the line that says madenoise = true;

Then change it to read something like:

if (!silencer) madenoise = true; else madenoise = false;

That will stop the guards from reacting to sound... Basically the above says "If NOT Silencer make a noise else shoot quiet with no alert.

You could also edit the GunAttack to allow for special gun types ... but my favorite is to use just the basic gun... so mine is:

if (!silencer)
{ madenoise = true; }
else
{
if (gamestate.chosenweapon = wp_pistol )
{ madenoise = false; }
else
{ madenoise = true; }
}

That's about it... of course I do count shots and the silencer does wear down over time... so it starts to get louder the more you use it... Smile
Until eventually its no good... And you need to find another...

Hope that helps...

Greg
BrotherTank
Guest




Last Visit:





PostPosted: Fri Apr 18, 2003 12:06 am
   Subject: Re: [Info] Silent Gun? - Adding a Silencer
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

That's a good idea, Greg.

Alternatively, if you just want a gun that is always silent, you could simply comment out the line in GunAttack that says "madenoise = true," and then add "madenoise = true" under the "SD_PlaySound" for each gun EXCEPT the one that is silenced.

Here's a little code from Operation Heimzahlung under "void GunAttack" in WL_AGENT.C:

::: CODE :::

   switch (gamestate.weapon)
   {
   case wp_pistol:
      SD_PlaySound (ATKPISTOLSND);
      madenoise = true;
      break;
   case wp_machinegun:
      SD_PlaySound (ATKMACHINEGUNSND);
      madenoise = true;
      break;
   case wp_chaingun:
      SD_PlaySound (ATKGATLINGSND);
      madenoise = true;
      break;
   case wp_sten:
      SD_PlaySound (ATKSTENSND);
      break;
   }

//   madenoise = true;


Notice that every "case wp_" has a "madenoise = true" except for wp_sten, which is silent. The madenoise statement at the bottom has been commented out.

Also, make sure that you remove the "madenoise = true" line from the DamageActor function in WL_STATE.C.
Guest




Last Visit:





PostPosted: Fri Apr 18, 2003 8:31 am
   Subject: Re: [Info] Silent Gun? - Adding a Silencer
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Thanks for all your answers ???D???D
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 Apr 18, 2003 8:34 am
   Subject: Re: [Info] Silent Gun? - Adding a Silencer
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

WSJ wrote:
That's a good idea, Greg.

Alternatively, if you just want a gun that is always silent, you could simply comment out the line in GunAttack that says "madenoise = true," and then add "madenoise = true" under the "SD_PlaySound" for each gun EXCEPT the one that is silenced.


That works as well... but mine was set as you pick up a silencer for your pistol.... but thanks for the compliment.

WSJ wrote:

Also, make sure that you remove the "madenoise = true" line from the DamageActor function in WL_STATE.C.


That is true, except that when a guard is shot, even with a silencer, he's bound to make some noise.... With this particular statement, I use the knife for silent attack. Because the knife is a close combat weapon, the first thing most attackers do in movies and probably real life, is somehow disable the person attacked from making noise... Once again, I look at the fine details... I try to make it realistic.

Greg
BrotherTank
Display posts from previous:   
Post new topicReply to topic Time synchronized with the forum server time
DieHard Wolfers Forum Index -> Code Crackers 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 [Help] Setting RocketLauncher: Explosive Range...?
Author: KyleRTCW
17 7423 Thu Jun 03, 2004 3:21 am
Codetech84 View latest post
No new posts [Info] Tricks - Dogs that shoot - Modifying Behaviour
Author: Guest
19 288 Sat Mar 20, 2004 7:31 am
Dugtrio17 View latest post
No new posts [Help] Berserk mode
Author: wolf3dbreaker
2 2513 Tue Feb 03, 2004 11:01 pm
Xarkon View latest post
No new posts [Info] Alarm Sounding in game?? WSJ...??
Author: Guest
7 311 Tue Jun 17, 2003 10:04 pm
Reivax44 View latest post
No new posts [Info] Adding Locked Doors
Author: Guest
3 244 Thu Apr 17, 2003 6:30 am
Ripper 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