Custom Sounds for Specific Weapons?

正在查看此主题的用户

状态
不接受进一步回复。

Danijongo

Sergeant at Arms
Well, as the title says,
Is it possible to set a custom swing sound for a specific weapon like a sword (in our case a lightsaber)
and while all the other swords and weapons beside the lightsaber should use the normal swing sound. If yes, how?

In other words,
using a new weapon_swing sound for a specific weapon/(in our case lightasbers) while keeping the default one for all other weapons, how?

Thanks in advance,
Danijongo.


 
Use the same approach used to make custom sounds for firearms and put a null sound in for the default swings.
 
xenoargh 说:
Use the same approach used to make custom sounds for firearms and put a null sound in for the default swings.

Hehe, i wish it was so easy. The thing is, we need some sounds to be heard when swinging a weapon, not silence. Plus, we can keep the native ones for all weapons apart from lightsaber.
 
You'd write a similar custom script for all of the "default" weapons as well.  So far as I know, that's the only way to do it.  It's how I made all the customized sounds for firearms work in Blood and Steel.
 
xenoargh 说:
You'd write a similar custom script for all of the "default" weapons as well.  So far as I know, that's the only way to do it.  It's how I made all the customized sounds for firearms work in Blood and Steel.

Would it work for melee weapons too? And which scripts should i copy/modify?
 
It should work for melee weapons, it uses ti_on_weapon_attack.  You just need a play_sound event there.
 
xenoargh 说:
It should work for melee weapons, it uses ti_on_weapon_attack.  You just need a play_sound event there.

Ye, this works for ranged weapons and firearms. But i need to change the sound of weapons swinging, feinting, and slashing, not only attacking. And this doesn't work for melee weapons. It's snd_sword_swing by default with s_swordSwing.wav.
 
Hrmm, I thought that ran for non-shooting weapons. 

Well, I don't think there's any way past that without using WSE; IIRC there are WSE methods to catch some of those things.  Can't see any other way around that, other than making use of the wooden_parry exception, which doesn't cover strikes, etc., all of that's hardcoded.
 
xenoargh 说:
It should work for melee weapons, it uses ti_on_weapon_attack.  You just need a play_sound event there.
That trigger does activate for melee weapons, but only on the server (unlike ranged). This is all you need, since agent_play_sound is automatically synched with nearby clients when run on the server.
 
xenoargh 说:
Does that mean it works in SP at all, though?
I'm not sure; I don't work on a single player mod to make it easy to test. Catches me out often when answering questions, habitually thinking in terms of MP.
 
Oooh, that's true man. I created a new sound, then increased its priority and decreased the deafult swing's volume , eventually added the ti_on_weapon_attack on the required weapons. It just works perfectly now. Thank you very much. My lightsabers owe you guys a favour  :wink:
 
Already answered here http://forums.taleworlds.com/index.php/topic,255083.msg6115164.html#msg6115164
Please search a bit before posting  :wink:
 
There is actually a more in depth code which I asked around a year ago. It made weapon type specific death sounds if I remember. Not sure if it's what you are looking for, but Ill link it anyway.

http://forums.taleworlds.com/index.php/topic,153564.15.html
 
SheriffTheRevenger 说:
Already answered here http://forums.taleworlds.com/index.php/topic,255083.msg6115164.html#msg6115164
Please search a bit before posting  :wink:

There are more sounds than just the initial effect the weapon uses on usage. Please read the OP next time.
 
SheriffTheRevenger 说:
Already answered here http://forums.taleworlds.com/index.php/topic,255083.msg6115164.html#msg6115164
Please search a bit before posting  :wink:

Ye, this was for ranged weapons. Thought that didn't work for melee weapons as well. I did try to search before posting.
 
SheriffTheRevenger 说:
Already answered here http://forums.taleworlds.com/index.php/topic,255083.msg6115164.html#msg6115164
Please search a bit before posting  :wink:
I know how to add a sound effect for a weapon, I asked if its possible to make a sound just for a specific sword, not all of the them....
Please read my question before posting.

Sincerely,
Danijongo.
 
状态
不接受进一步回复。
后退
顶部 底部