Jump to content
  • 0

The GZDoom is not GZDooming (Decorate Bug)


Question

Posted (edited)

DECORATE below:

 

ACTOR SPAS12 : HL1Weapon replaces Shotgun
  {
     Weapon.AmmoGive 8
     Weapon.AmmoUse1 1
     Weapon.AmmoUse2 2
     Weapon.AmmoType "ShotgunAmmo"
     Weapon.SlotNumber 3
     Inventory.PickupMessage "You got the SPAS-12! (Slot 3)"
     Tag "SPAS-12"
     Obituary "%o was peppered with buckshot by %k's SPAS-12."
     +WEAPON.ALT_USES_BOTH
     States
     {
     Spawn:
        SPAS Z -1
        Stop
     Ready:
        SPAS A 1 A_WeaponReady
        Loop 
     Deselect:
        TNT1 AAAAAAAAAAAAAAA 0 A_Lower
        TNT1 A 1 A_Lower
        Loop
     Select:
        SPAS A 1 A_Raise
        Loop 
     Fire:
        SPAS A 0 A_Quake(1,10,0,100)
        SPAS A 0 A_FireBullets(6, 6, 6, 5, HL1BulletPuff, FBF_USEAMMO)
        SPAF A 1 bright A_GunFlash
        SPAF B 1 bright A_PlaySound("weapons/spas12fire")
        SPAF CDEFG 1 bright
        SPAS HIJKLMNO 1
        SPAS P 1 A_PlaySound("weapons/spas12pump")
        SPAC A 1 A_Overlay(500, "CasingsCanFly")
        SPAC BCDE 1
        SPAS PONM 1
        SPAS LKJIHA 1 A_Refire
        Goto Ready
     Flash:
        SPAS ABCDEFG 1
        Goto LightDone
     CasingsCanFly:
        SPAS QRSRQ 1
        Stop
     }
  }

 

^ The shotgun works completely fine except for its firing sound supposedly played from A_PlaySound, which instead registers in-game as brown noise for some reason. Giving it an attack sound would fix it, but I want it to have two different firing sounds for states Fire and AltFire.

 

SNDINFO below:

weapons/spas12fire                sbarrel1

 

Infomation about sbarrel1.wav (taken directly from Half-Life's files):

Sound (Wav Format)
Mono 8-bit sound with 22904 samples at 22050 Hz
Format: PCM

Information:
Software: File created by GoldWave.  GoldWave copyright (C) Chris Craig

Chunks: fmt , data, LIST_INFO

 

The pumping sound works completely fine on the other hand, and it just happens to have below 20,000 samples.

 

Changing it to Doom's lump format didn't work.

 

I recently got GZDoom 4.11.3, so I wonder if that's the problem.

 

I don't know what's happening and I really want solutions. Shotgun not supposed to fire brown noise, shotgun supposed to fire shotgun.

Edited by DASniperIC

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 1
2 hours ago, Dark Pulse said:

You need to enclose it in quotes if you're using longer than eight characters for the sound name in either half of the definition. Since you're defining the sounds as spas12fire and spas12pump, that's ten characters each.

 

The eight character limit / quote need is only for the lump name, not for the logical sound name.

 

 

39 minutes ago, DASniperIC said:

What I found out though, is that A_Quake completely cancels out A_PlaySound during its duration, which explains the brown noise when firing. Removing A_Quake fixes it.

 

Yes, this is probably source of the problem. You need to play your weapon sounds in different channel than the default CHAN_BODY, for example CHAN_WEAPON.

A_PlaySound("weapons/spas12fire", CHAN_WEAPON)

 

Share this post


Link to post
  • 0
Posted (edited)

You need to enclose it in quotes if you're using longer than eight characters for the sound name in either half of the definition. Since you're defining the sounds as spas12fire and spas12pump, that's ten characters each.

 

So either put 'em in quotes (just like in the DECORATE code you got), or rename them to be under eight - spasfire/spaspump would work (then adjust your DECORATE accordingly).

Edited by Dark Pulse

Share this post


Link to post
  • 0
1 hour ago, Dark Pulse said:

You need to enclose it in quotes if you're using longer than eight characters for the sound name in either half of the definition. Since you're defining the sounds as spas12fire and spas12pump, that's ten characters each.

 

So either put 'em in quotes (just like in the DECORATE code you got), or rename them to be under eight - spasfire/spaspump would work (then adjust your DECORATE accordingly).

It should have nothing to do with the sound definition. spas12pump is ten characters, but it works fine when it is played.

 

What I found out though, is that A_Quake completely cancels out A_PlaySound during its duration, which explains the brown noise when firing. Removing A_Quake fixes it.

Share this post


Link to post
  • 0
12 hours ago, jaeden said:

 

The eight character limit / quote need is only for the lump name, not for the logical sound name.

 

 

 

Yes, this is probably source of the problem. You need to play your weapon sounds in different channel than the default CHAN_BODY, for example CHAN_WEAPON.


A_PlaySound("weapons/spas12fire", CHAN_WEAPON)

 

This fixed it. Thank you all!

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...