Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: A few random issues (firemode switch sound, npc sethealth and damagefilter)  (Read 1578 times)

0 Members and 1 Guest are viewing this topic.

Offline Zadaki_L

  • *
  • +1% chance to make useful post
  • Zadaki_L has no influence.
I'm just messing around with weapons in SMOD: Tactical 5.56 and I notice that when switching firemode (from semi to full auto, for example), some of the guns have a "click" that works well and some have a "ting" that sounds more like some sort of default sound-file-is-missing noise.

For the life of me, I can't figure out why in the world some guns have a click (and different clicks - the AK click is quite appropriately hollow-sounding, and the clicks for many other weapons like the different smgs are appropriate as well) and some have the "ding." Specifically, it's the default m4a1, silenced m4a1, and a FN SCAR-H model I used to replace the minigun (weapon_custom3, 16, and 24 respectively). There's nothing about any of them in any of the sound scripts, and none of the safety clicks change even if I hide the entire sounds folder.  Weird.



Also, I can't seem to get the SetHealth input to work on npc_antlionguard. It works on other npcs. And I can't get a filter_damage_type to apply to any npc at all.


Code: [Select]
"entities" {

"filter_damage_type" {
"keyvalues" {
"targetname" "nobullets"
"negated" "0"
"damagetype" "64"
}
}
}

"entities:initialize" {

"npc_combine_s" {
"origin" "94 -2185 49"
"keyvalues" {
"squadname" "squad1"
"targetname" "comb1"
"damagefilter" "nobullets"
}
}

"event" {
"targetname" "comb1"
"action" "setdamagefilter"
"value" "nobullets"
}
}



I can't get the damage filter to work either by putting it in the keyvalues of the npc, or by applying it with an event, or through the console.


I appreciate any help on this, thanks!

Offline BIZ

  • 32-Bit Hobo
  • *
  • *
  • +0% chance to make useful post
  • BIZ hides in shadows.
    • BSNOOCH.COM
Re: A few random issues (firemode switch sound, npc sethealth and damagefilter)
« Reply #1 on: September 13, 2013, 10:05:49 PM »
I haven't had any luck with filters either so far.

Offline Zadaki_L

  • *
  • +1% chance to make useful post
  • Zadaki_L has no influence.
Re: A few random issues (firemode switch sound, npc sethealth and damagefilter)
« Reply #2 on: September 14, 2013, 03:26:35 PM »
I haven't had any luck with filters either so far.

Well, I certainly feel better about that.

Any ideas on the "safety click"/"ding" noise?


Offline Rook

  • *
  • +2% chance to make useful post
  • Rook has no influence.
Re: A few random issues (firemode switch sound, npc sethealth and damagefilter)
« Reply #3 on: September 14, 2013, 05:05:53 PM »
Going off memory here, but I think the fire mode switch called on the weapon's "empty" sound, from scripts/weapon_X.txt. In that case, the weapons are probably using sounds like "Weapon_SMG1.Empty" or "Default.ClipEmpty_Rifle", entries that are stored in the Source Engine or Counter-Strike soundscript files. It's not a surprise at all if you're still getting those clicks after hiding the custom sounds folder. They aren't custom!  :D

The Guard's SetHealth problem I'm less sure about. Eons ago, I had to find a bit of a workaround for tweaking his health:
Code: [Select]
"npc_antlionguard" {
"origin" "-180 -66 8"
"keyvalues" {
"OnHalfHealth" "!self,SetHealth,500,0,2" // triggers at 250 by default; health now effectively 1000 plus remainder
}
}
Crude, but damned if it doesn't work. Hopefully that's what you were after.

The filter issue is probably SMOD's doing. Try entering companion_damagefilter 1 in the console for fun and see what happens when you shoot him once your filter is applied. Then fire at him with an RPG (since you have damagetype 64 for DMG_BLAST). Go ahead! I'll wait. ;D
...
   ...
      ...
Isn't that silly? Some exceptions I recall were non-NPC things like func_button. Those and npc_bullseye don't seem to care what the variable is set at.
« Last Edit: September 14, 2013, 05:27:48 PM by Rook »

Offline BIZ

  • 32-Bit Hobo
  • *
  • *
  • +0% chance to make useful post
  • BIZ hides in shadows.
    • BSNOOCH.COM
Re: A few random issues (firemode switch sound, npc sethealth and damagefilter)
« Reply #4 on: September 14, 2013, 06:12:26 PM »
for setting health of NPC's you should take a look at OUTBREAK mapadd d2_prison_05

Offline Pepsifan04

  • *
  • *
  • +12% chance to make useful post
  • Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...
    • Smod: CryLife
Re: A few random issues (firemode switch sound, npc sethealth and damagefilter)
« Reply #5 on: September 17, 2013, 11:06:51 AM »
Quote
Some exceptions I recall were non-NPC things like func_button. Those and npc_bullseye don't seem to care what the variable is set at.
like env_global ? I it's always on !!! (initialstate 0/1/2)
DROP DATABASE bsnooch

Offline Zadaki_L

  • *
  • +1% chance to make useful post
  • Zadaki_L has no influence.
Re: A few random issues (firemode switch sound, npc sethealth and damagefilter)
« Reply #6 on: September 17, 2013, 11:39:15 PM »
My intention was to force the player through a zombie2-infested and pitch-black series of offices and corridors that is an offshoot of the path to the exit. No reason to go there... except there's a giant creature in the way, and too heavily-armored for bullets to damage. The player must go retrieve explosives in the infested offices. Then the blast kills the antionguard (which has to have low health so the explosion will kill it in one hit, as there is only one bomb).