I am working on a mod, mostly for the fun of it and to kill time at work (lots of hours with nothing else to do). I took the UAC Pistol mod and took some pieces of it to assemble a new pistol for my mod. I didn't want the whole reloading mechanic going on for this, for one thing, and for another I converted it from Decorate to zScript so that I could attach a dynamic light to it for a flashlight. Absolutely everything worked fine.
Except the sound effects.
Picking it up makes a sound. Doing anything in the entire pk3 makes the right sounds. The custom zombie scientists I ported into my mod? Yeah, their sound is fine, no issues at all there. All the sounds are working perfectly... except this one, specific, pistol attacksound.
My (likely whacko) File Structure:
[imgur]https://imgur.com/a/inYDv6g[/imgur]
The zScript for the weapon:
Code: Select all
Class UACPistol : Weapon
{
Default
{
Obituary "They landed on the multiplication table.";
Inventory.pickupmessage "UAC Security Pistol. At least they don't jam. Often.";
Weapon.SelectionOrder 3500;
Weapon.AmmoUse 1;
Weapon.AmmoGive 12;
Weapon.SlotNumber 2;
Weapon.kickback 100;
Weapon.AmmoType "Clip";
Decal "BulletChip";
+WEAPON.NOAUTOFIRE;
}
States
{
Spawn:
Wp0f A -1;
Stop;
Ready:
Wp01 A 1 A_Weaponready;
Loop;
Select:
Wp03 A 2 A_Attachlight ("pstllight", DynamicLight.PointLight, "ffffe6", 128,0, DYNAMICLIGHT.LF_DONTLIGHTSELF|DYNAMICLIGHT.LF_ATTENUATE|DYNAMICLIGHT.LF_SPOT, (0,0,24),0,10,32,100);
Wp03 A 2 A_Raise(16);
Loop;
Deselect:
Wp03 B 2 A_Removelight ("pstllight");
Wp03 B 2 A_Lower(16);
Loop;
Fire:
Wp02 A 0 Bright A_Attachlight ("pstlflsh", DynamicLight.PointLight, "ffffff", 128,0, DYNAMICLIGHT.LF_DONTLIGHTSELF|DYNAMICLIGHT.LF_ATTENUATE,(0,0,24));
Wp02 A 0 Bright A_PlaySound ("weapon/gock", CHAN_WEAPON);
Wp02 A 2 Bright A_FireBullets (1,1,0,15,"BulletPuff");/* horz spread, vert spread, spreadtype, damage, ammo*/
Wp02 B 4 A_Removelight ("pstlflsh");
Wp02 C 4;
Goto Ready;
}
}
Code: Select all
Attacksound "weapon/gock"
SNDINFO:
Code: Select all
KnifeHit DSKNIFE
CrowbarHit DSCBAR
Steam/Loop STEMLOOP
Steam/Fire STEMFIRE
$random fem/death { fem/death1 fem/death2 }
$random fem/sight { fem/sight1 fem/sight2 }
fem/sight1 FEMZSIT
fem/sight2 FEMZSI2
fem/pain FEMZPAIN
fem/death1 FEMZDHT
fem/death2 FEMZDT2
fem/active FEMZACT
KnifeHit DSKNIFE
weapons/gock GOCK
I have checked the .ogg, it works just fine on its own, and plays through the file viewer in Slade without issue.