Discuss all aspects related to modding Zandronum here.
-
ninja2000
-
- Posts: 25
- Joined: Fri Aug 03, 2012 3:10 pm
#1
Post
by ninja2000 » Sun Mar 22, 2015 12:31 pm
Hello.
The saw makes additional noise (when player dies while attacking). The sound is played every time when the player ends the attack. I've tried a lot to remove this sound. Any suggestions to remove it from the attack section?
The chainsaw code:
Code: Select all
ACTOR "chain saw" : weapon replaces chainsaw
{
Weapon.Kickback 0
Weapon.SelectionOrder 2200
Inventory.PickupMessage "$GOTCHAINSAW"
Obituary "$OB_MPCHAINSAW"
+WEAPON.MELEEWEAPON
States
{
Ready:
TNT1 A 0 A_AlertMonsters
TNT1 A 0 A_PlaySound ("weapons/sawidle")
SAWG CD 4 A_WeaponReady
Loop
Deselect:
SAWG C 0 A_Lower
SAWG C 1 A_Lower
Loop
Select:
TNT1 A 0 A_PlaySound ("weapons/sawup")
SAWG C 0 A_Raise
SAWG C 1 A_Raise
Loop
Fire:
SAWG AB 4 A_Saw ("weapons/sawfull", "weapons/sawhit", 3, Bulletpuff)
SAWG B 0 A_ReFire
Goto Ready
Spawn:
CSAW A -1
Stop
}
}
-
Arctangent
-
- Posts: 82
- Joined: Mon Nov 24, 2014 8:19 am
#2
Post
by Arctangent » Sun Mar 22, 2015 4:27 pm
I'm really tempted to say that it's not actually any new sounds, but just a part of sawfull or sawhit that you usually don't hear because the sound is more than 0.11 seconds long and the idle sound interrupts them. Try replacing those with a far shorter sound and see if that happens.
-
ninja2000
-
- Posts: 25
- Joined: Fri Aug 03, 2012 3:10 pm
#3
Post
by ninja2000 » Sun Mar 22, 2015 4:45 pm
Thank for the tip, but I've already patched this up. It took me like 30 minutes of thinking (I should get more breaks, so I can see more stuff in the code).
This is the new chainsaw code
Code: Select all
ACTOR "chain saw" : weapon replaces chainsaw
{
Weapon.Kickback 0
Weapon.SelectionOrder 2200
Decal Bulletchip
Inventory.PickupMessage "$GOTCHAINSAW"
Obituary "$OB_MPCHAINSAW"
+WEAPON.MELEEWEAPON
States
{
Ready:
TNT1 A 0 A_AlertMonsters
TNT1 A 0 A_PlaySound ("weapons/sawidle")
SAWG CD 4 A_WeaponReady
Loop
Deselect:
SAWG C 0 A_Lower
SAWG C 1 A_Lower
Loop
Select:
TNT1 A 0 A_PlaySound ("weapons/sawup")
SAWG C 0 A_Raise
SAWG C 1 A_Raise
Loop
Fire:
TNT1 A 0 A_PlaySound ("weapons/sawfull")
SAWG AB 2 A_Saw (0, "weapons/sawhit", 2.5)
SAWG B 0 A_ReFire
Goto Ready
Spawn:
CSAW A -1
Stop
}
}
Last edited by
ninja2000 on Sun Mar 22, 2015 4:46 pm, edited 1 time in total.
-
Dusk
- Developer
- Posts: 581
- Joined: Thu May 24, 2012 9:59 pm
- Location: Turku
#4
Post
by Dusk » Sun Mar 22, 2015 6:34 pm
A_Saw plays sounds on CHAN_WEAPON while A_PlaySound uses CHAN_BODY by default, so the A_PlaySound call didn't override the existing weapon channel sound. Your new code plays everything on the body channel.
I'd advise using the first code and supplying CHAN_WEAPON to all A_PlaySound calls (or use A_PlayWeaponSound as a short-hand for this).