SLADE EDITOR RANDOM SOUND PLAYING ERROR

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
Psychojack88
Posts: 12
Joined: Sat May 07, 2022 10:12 pm
Graphics Processor: nVidia (Modern GZDoom)

SLADE EDITOR RANDOM SOUND PLAYING ERROR

Post by Psychojack88 »

I have recently been working on a melee oriented companion mod template. For this test I'm using Daisy Eternal as the character. In this mod, the she is supposed to say random lines when she sees an enemy. So far the sounds for the attacks are working, her death sound, and the dialogue when she does one of the attacks (her jump attack) , however the dialogue for here "see" state are not playing at all. Currently they are the only ones in the $random tag in the SNDINFO so I think I'm doing something wrong here. I tried it in Ultimate Doom Builder and can use the console playsound to find the sound without a problem, it just won't play for some reason.

Here's the DECORATE

ACTOR DaisyEternal 16673
{
Health 667
Radius 20
Height 40
Speed 12
PainChance 128
+FRIENDLY
+FLOORCLIP
+NOTARGET
+NOGRAVITY
+NOBLOCKMONST
+QUICKTORETALIATE
+DONTHARMSPECIES
+NOINFIGHTSPECIES
+SHOOTABLE
-COUNTKILL //Added
Monster
Meleerange 64
SeeSound "daisy/see"
PainSound "daisy/pain"
DeathSound "daisy/death"
AttackSound "daisy/attack"
Obituary "%o got killed by a waifu rabbit. Probably deserved it"
Scale 0.8
States
{
Spawn:
DEID A 10 A_Look
Loop

Alert:
TNT1 A 0 A_PlaySound("daisy/see")
Goto See

See:
DAW1 AA 2
DAW1 BBCCDD 2 A_Chase
Loop


// 🔹 Modified Melee with randomizer
Melee:
TNT1 A 0 A_Jump(64, "JumpAttack") // 50% chance to use jump attack
Goto NormalSlash

NormalSlash: // original melee attack
DASH A 4 A_FaceTarget
DASH B 4 A_PlaySound ("daisy/attack")
DASH C 4
DASH D 4 A_CustomMeleeAttack(25, 0)
DASH EF 4
Goto See

// 🔹 New JumpAttack state DAJP ARE FILLERS - REPLACE WITH PROPER SPRITES

JumpAttack:
JUMA A 4 {A_FaceTarget ; A_SetInvulnerable ;} //A_SetInvulnerable prevents Daisy from being interupted mid-attack. She'll float in the air otherwise.
JUMA B 4 A_ChangeVelocity(8, 0, 3, CVF_RELATIVE)// leap forward + small hop (jump up)
JUMA C 4 A_PlaySound ("daisy/jump") // mid-air frame start
JUMA D 4 A_PlaySound ("daisy/jumpspeak") // mid-air frames
JUMA E 4 A_SetInvulnerable ()
JUMA F 2 {A_ChangeVelocity(0, 0, -10, CVF_REPLACE); A_UnSetInvulnerable ;} // controlled fall (slam down). UnsetInvulnerable makes Daisy Vulnerable to attacks again.
JUMA G 6 A_FaceTarget
JUMA H 6 A_CustomMeleeAttack(50) // slam hit
Goto See
//JumpAttack:
// JUMA AB 4 A_FaceTarget
// JUMA C 4 A_ChangeVelocity(0, 0, 12, CVF_REPLACE) // jump up
// JUMA DE 6
// JUMA EF 6
// JUMA G 2 A_ChangeVelocity(0, 0, -12, CVF_REPLACE) // slam down
// JUMA H 4 A_CustomMeleeAttack(50,) // strike
// Goto See
Pain:
DAPN A 4 A_PlaySound ("daisy/pain")
DAPN A 4 A_Pain
Goto See

Death:
DAKK A 5 A_PlaySound ("daisy/death")
DAKK B 5 A_Scream
DAKK C 5 A_NoBlocking
DAKK DEFGH 5
DAKK H -1 //THIS ALLOWS A MONSTER BODY TO REMAIN FOREVER. WITHOUT IT, BODY DISAPPEARS!
Stop
}
}

And here's the SNDINFO

daisy/pain SOUNDS/DEDIPAIN.lmp
$volume daisy/pain 3.0
daisy/death SOUNDS/DEKNOKOUT.lmp
$volume daisy/death 2.5
daisy/attack SOUNDS/DESLASH.lmp
daisy/block SOUNDS/DEBLKRDY.lmp
daisy/blockimpact SOUNDS/DEBLKIMP.lmp
daisy/aoe SOUNDS/DEAOE.lmp
daisy/thrust SOUNDS/DETHRUST.lmp
daisy/step SOUNDS/DESTEP.lmp
daisy/spell SOUNDS/DESPELL.lmp
daisy/knockout SOUNDS/DEKNOKOUT.lmp
$volume daisy/knockout 1.5
daisy/jump SOUNDS/DEJUMP.lmp
daisy/jumpspeak SOUNDS/DEDIDODGE.lmp
$volume daisy/jumpspeak 1.5
daisy/getsuga SOUNDS/DEGETSU.lmp
daisy/combo SOUNDS/DECOMBO.lmp
$random daisy/see //RANDOM DIALOGUE DURING COMBAT START
{
SOUNDS/DEDIRIPTEAR.lmp
SOUNDS/DEDIURSODEAD.lmp
SOUNDS/DEDIHAVFUN.lmp
SOUNDS/DEDIKILLDEMON.lmp
SOUNDS/DEDISEE.lmp
}

daisy/taunt1 SOUNDS/DEDIRIPTEAR.lmp
$volume daisy/taunt1 2.5 //APPLIES TO DAISY/COMBATDIALOGUE
daisy/taunt2 SOUNDS/DEDIURSODEAD.lmp
$volume daisy/taunt2 2.5
daisy/taunt3 SOUNDS/DEDIHAVFUN.lmp
$volume daisy/taunt3 2.5
daisy/taunt4 SOUNDS/DEDIKILLDEMON.lmp
$volume daisy/taunt4 2.5
daisy/taunt5 SOUNDS/DEDISEE.lmp
$volume daisy/taunt5 2.5

Anyone can tell me what I may be doing wrong for the "see" state that is leading to an issue with playing the sounds correctly? I would put the pk3 but the attachment size is above the 52kib limit on the forum.
Psychojack88
Posts: 12
Joined: Sat May 07, 2022 10:12 pm
Graphics Processor: nVidia (Modern GZDoom)

Re: SLADE EDITOR RANDOM SOUND PLAYING ERROR

Post by Psychojack88 »

Never mind, I was able to find out what the problem was. I had unintentionally used

SOUNDS/DEDIRIPTEAR.lmp
SOUNDS/DEDIURSODEAD.lmp
SOUNDS/DEDIHAVFUN.lmp
SOUNDS/DEDIKILLDEMON.lmp
SOUNDS/DEDISEE.lmp

Instead of calling on

daisy/taunt1
daisy/taunt2
daisy/taunt3
daisy/taunt4
daisy/taunt5

For the randomized speech.
Post Reply

Return to “Scripting”