$playersound troubles

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
User avatar
Doominer441
Posts: 207
Joined: Thu Oct 24, 2013 9:04 pm
Preferred Pronouns: They/Them

$playersound troubles

Post by Doominer441 »

Can someone please help me with this? I'm trying to add new sounds to a player class, but none of the sounds even play:

Code: Select all

JacobNormalDeath         plrdth
JacobCrazyDeath          plrcdth
JacobExtreme1Death       clxdth1
JacobExtreme2Death       clxdth2
JacobExtreme3Death       clxdth3
JacobPain                plrpain3
JacobGrunt               grunt1
JacobPoisonCough         pois2
JacobFallingScream       fall1
JacobFallingSplat        fallhit
JacobBurnDeath           plrburn
JacobFailedUse           grunt1
JacobPuzzleFail			 clhmm

$random JacobExtremeDeathPicker	{ JacobExtreme1Death JacobExtreme2Death JacobExtreme3Death }

$playersound	Jacob	male	*death		JacobNormalDeath
$playersound	Jacob	male	*crazydeath	JacobCrazyDeath
$playersound	Jacob	male	*burndeath	JacobBurnDeath
$playersound	Jacob	male	*xdeath		JacobExtremeDeathPicker
$playersound	Jacob	male	*pain100	JacobPain
$playersounddup	Jacob	male	*pain75		*pain100
$playersounddup	Jacob	male	*pain50		*pain100
$playersounddup	Jacob	male	*pain25		*pain100
$playersound	Jacob	male	*grunt		JacobGrunt
$playersound	Jacob	male	*land		PlayerLand
$playersound	Jacob	male	*poison		JacobPoisonCough
$playersound	Jacob	male	*falling	JacobFallingScream
$playersound	Jacob	male	*splat		JacobFallingSplat
$playersound	Jacob	male	*usefail	JacobFailedUse
$playersound	Jacob	male	*puzzfail	JacobPuzzleFail
(the code itself isn't that messy, the spacing just got screwed up pasting it)

I have all the defined sounds, so what's going on?
Blue Shadow
Posts: 5043
Joined: Sun Nov 14, 2010 12:59 am

Re: $playersound troubles

Post by Blue Shadow »

[wiki=SNDINFO#playersound]$playersound[/wiki] takes a sound lump, not a sound definition, like you're doing there.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: $playersound troubles

Post by wildweasel »

Blue Shadow wrote:[wiki=SNDINFO#playersound]$playersound[/wiki] takes a sound lump, not a sound definition, like you're doing there.
If you're wanting to use a sound definition anyway, though, you want $playeralias.
User avatar
Doominer441
Posts: 207
Joined: Thu Oct 24, 2013 9:04 pm
Preferred Pronouns: They/Them

Re: $playersound troubles

Post by Doominer441 »

Alright, I've changed it to $playeralias, but now none of the death, pain, splat, or poison sounds will play. I have them defined, and I double-checked to see if they had any conflicts or name differences, but nothing I do will work.

I've changed the code to be a bit more logically named.

Code: Select all

JacobNormalDeath         jdeath
JacobCrazyDeath          jcdeth
JacobExtreme1Death       jxdth1
JacobExtreme2Death       jxdth2
JacobExtreme3Death       jxdth3
JacobPain                jpain
JacobGrunt               jgrunt
JacobLand				 jland
JacobPoisonCough         jpoisn
JacobFallingScream       jfalls
JacobFallingSplat        jfalld
JacobBurnDeath           jburns
JacobFailedUse           jgrunt
JacobPuzzleFail			 jpuzzf

$random JacobExtremeDeathPicker	{ JacobExtreme1Death JacobExtreme2Death JacobExtreme3Death }

$playeralias	Jacob	male	*death		JacobNormalDeath //X
$playeralias	Jacob	male	*crazydeath	JacobCrazyDeath //X
$playeralias	Jacob	male	*burndeath	JacobBurnDeath //X
$playeralias	Jacob	male	*xdeath		JacobExtremeDeathPicker //X
$playeralias	Jacob	male	*pain100	JacobPain //X
$playersounddup	Jacob	male	*pain75		*pain100
$playersounddup	Jacob	male	*pain50		*pain100
$playersounddup	Jacob	male	*pain25		*pain100
$playeralias	Jacob	male	*grunt		JacobGrunt
$playeralias	Jacob	male	*land		JacobLand
$playeralias	Jacob	male	*poison		JacobPoisonCough //X
$playeralias	Jacob	male	*falling	JacobFallingScream
$playeralias	Jacob	male	*splat		JacobFallingSplat //X
$playeralias	Jacob	male	*usefail	JacobFailedUse
$playeralias	Jacob	male	*puzzfail	JacobPuzzleFail
The commented "X"s are all the sounds that won't work.
Post Reply

Return to “Scripting”