Player.SoundClass?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
Hell-met
Posts: 43
Joined: Mon Oct 28, 2019 9:23 pm

Player.SoundClass?

Post by Hell-met »

Hello

I've searched quite a few threads on this matter but I do not understand what I am doing wrong. My custom player has the correct player.soundclass but it still plays doomguy's default grunts no matter what.
ACTOR BaronClass : PlayerPawn
{

Player.ViewHeight 64
Player.MaxHealth 1000
Player.DisplayName "Baron of Hell"
Player.ForwardMove 0.65
Player.SideMove 0.65
Player.StartItem "Claws"
Player.SoundClass "Baron"
Player.damagescreencolor "Green", 0.35
+NOSKIN

Health 1000
radius 20
height 56
mass 1000
speed 1
painchance 50
seesound "baron/sight"
painsound "baron/pain"
deathsound "baron/death"
activesound "baron/active"
+FLOORCLIP
states
{
Spawn:
BOSS A -1
stop
See:
BOSS AABBCCDD 3
loop
Missile:
BOSS EF 8
BOSS G 8
goto Spawn
Pain:
BOSS H 2
BOSS H 2 A_Pain
goto Spawn
Death:
BOSS I 8
BOSS J 8 A_Scream
BOSS K 8
BOSS L 8 A_NoBlocking
BOSS MN 8
BOSS O -1
stop
}
}
SNDINFO
$playersound Baron male *death dsbrsdth
$playersound Baron male *xdeath dsbrsdth
$playersound Baron male *gibbed dsslop
$playersound Baron male *pain100 dsdmpain
$playersounddup Baron male *pain75 *pain100
$playersounddup Baron male *pain50 *pain100
$playersounddup Baron male *pain25 *pain100
$playersound Baron male *grunt dsbrssit
$playersound Baron male *land dsbrssit
$playersound Baron male *jump dsjump
$playersound Baron male *fist dsclaw
$playersound Baron male *usefail dsdmact
$playersound Baron female *death dsbrsdth
$playersound Baron female *xdeath dsbrsdth
$playersound Baron female *gibbed dsslop
$playersound Baron female *pain100 dsdmpain
$playersounddup Baron female *pain75 *pain100
$playersounddup Baron female *pain50 *pain100
$playersounddup Baron female *pain25 *pain100
$playersound Baron female *grunt dsbrssit
$playersound Baron female *land dsbrssit
$playersound Baron female *jump dsjump
$playersound Baron female *fist dsclaw
$playersound Baron female *usefail dsdmact
$playersound Baron other *death dsbrsdth
$playersound Baron other *xdeath dsbrsdth
$playersound Baron other *gibbed dsslop
$playersound Baron other *pain100 dsdmpain
$playersounddup Baron other *pain75 *pain100
$playersounddup Baron other *pain50 *pain100
$playersounddup Baron other *pain25 *pain100
$playersound Baron other *grunt dsbrssit
$playersound Baron other *land dsbrssit
$playersound Baron other *jump dscjump
$playersound Baron other *fist dsclaw
$playersound Baron other *usefail dsdmact
Help
User avatar
SanyaWaffles
Posts: 871
Joined: Thu Apr 25, 2013 12:21 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11 for the Motorola Powerstack II
Graphics Processor: nVidia with Vulkan support
Location: The Corn Fields
Contact:

Re: Player.SoundClass?

Post by SanyaWaffles »

Post a runnable example.
Hell-met
Posts: 43
Joined: Mon Oct 28, 2019 9:23 pm

Re: Player.SoundClass?

Post by Hell-met »

I'm not at home currently but I will post the wad as soon as I can
Hell-met
Posts: 43
Joined: Mon Oct 28, 2019 9:23 pm

Re: Player.SoundClass?

Post by Hell-met »

SanyaWaffles wrote:Post a runnable example.
Here you go

http://www.sourceop.com/hell-met/test.wad

please note 98% of the scripting in there is Aluqah's work. it is for personal use as I am merely learning doom modding and will not claim their work as mine
Jarewill
 
 
Posts: 1853
Joined: Sun Jul 21, 2019 8:54 am

Re: Player.SoundClass?

Post by Jarewill »

As is, SNDINFO is not being loaded because it's between the A_START/A_STOP markers, which are used for ACS scripts.
Move the SNDINFO outside of those (and any) markers and it will work.
Post Reply

Return to “Scripting”