I can't figure out a few issues with my Decorate and SNDINFO

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
KUBA18i
Posts: 9
Joined: Mon Oct 28, 2019 3:57 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Sosnowiec, Silesia, Poland

I can't figure out a few issues with my Decorate and SNDINFO

Post by KUBA18i »

Greetings!
I'm trying to create a new mod that makes use of modern ZDoom features. Sadly, despite my studying of the ZDoom wiki, I ran into a few problems. I'd like to ask for some assistance.
1) There's a new monster included. It's a witch that flies around and drops eggs, that spawn chickens. Problem is, if the egg touches a floor, the chicken dies as soon as it spawns. Another side effect - the egg itself causes damage, despite not being scripted to do so, at least not intentionally.
2) Pumpkin spawner doesn't work. Same as above.
3) A lot of actors have sounds not playing, despite being defined. For example, Toy soldier is silent aside from pain(note, he is meant to have walking sound like Cyberdemon or Arachnotron), Witch attack sound doesn't play, same for Wizard, Caco doesn't play death sound, pumpkin smashing sound doesn't play, the only player sound that works is the one that plays when you drop off a height.
4) Is it possible to have WitchDead ignore other actors and only play its death animation when it hits a wall? Not essential, but asking anyway.

I will include the DECORATE and SNDINFO Lumps below. I shall also link(the file seems to be too big to attach) the PK3 in question for those interested.

DECORATE:
Spoiler:
SNDINFO:
Spoiler:
https://www.dropbox.com/s/prrk2nw8qaxpz ... d.pk3?dl=0

I'm looking forward to your response. I'd like to apologize if this isn't the best forum for this kind of post, since it mixes a few areas of interest.
Best regards
User avatar
Void Weaver
Posts: 724
Joined: Thu Dec 18, 2014 7:15 am
Contact:

Re: I can't figure out a few issues with my Decorate and SND

Post by Void Weaver »

1b) Actually 'Damage 20' is explicit defined into your witch egg. And it's a quite major value, at least unless it isn't expression value 'Damage (20)'.

1a), 2) - probably monsters spawning falls check for possible spawning space. If it cause of spawn fail indeed then definition of specific flag would fix it, smth. like:
WCEG B 8 Bright A_SpawnItemEx("WitchChicken",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION) //And the same flag for PumkinSpw.

3) Sounds.
a) make sure that in each 'Death' state defined A_Scream function for 'DeathSound' playback;
b) make sure that a sound channels defined inside of each A_PlaySound, especially if it's a looped sound.

4) Read more about a some specific states like a XDeath. Define this state as blank state into your WitchDead, side from already existed 'Death', smth. like:

Code: Select all

Death:
MISL B 8 Bright A_SetScale(3.5)
MISL C 6 Bright
MISL D 4 Bright
Stop

XDeath:
TNT1 A 0
Stop
KUBA18i
Posts: 9
Joined: Mon Oct 28, 2019 3:57 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Sosnowiec, Silesia, Poland

Re: I can't figure out a few issues with my Decorate and SND

Post by KUBA18i »

Thanks.
I figured out the problem with the spawner, but now for some reason, the egg spawns two chickens. Few more things I'd like to ask about.
1) I wish to remove all blood and splatter due to the nature of the mod. Need I replace blood sprites, or a few commands will do?
2) DaWizard is meant to drop a RedCard upon death, as defined in DropItem. This doesn't happen for some reason.
3) WitchDeath is meant to fly at the direction the Witch was facing upon Death, but it always goes after the player.
4) I can see there's a problem with the sounds, because some don't even play using the PlaySound console command. As can be seen in the SNDINFO lump in the first post and the file structure, some don't work, despite being defined the same way as the ones that work.
5) Possible to make the PumpkinSpawner make the new Cacodemon face the player upon spawning without modyfing the Cacodemon itself?

I updated the dropbox file, I'll include the new version of Decorate below.
Spoiler:
I'm kinda in a rush now, but maybe will type more later.
User avatar
Tartlman
Posts: 226
Joined: Thu Oct 11, 2018 5:24 am
Location: meme hell
Contact:

Re: I can't figure out a few issues with my Decorate and SND

Post by Tartlman »

1. If you want to remove all blood, probably the best thing you can do is add the +NOBLOOD flag to everything.
2. Remove the 256 from the dropitem maybe? That should fix it.
3. As for the witch's death facing the player, that's probably because A_CustomMissile might auto-face the target. Try using A_SpawnItemEx instead.
4. I'm no expert on sndinfo and can't help with that, sorry
5. Try calling A_FaceTarget before the spawn.
User avatar
Void Weaver
Posts: 724
Joined: Thu Dec 18, 2014 7:15 am
Contact:

Re: I can't figure out a few issues with my Decorate and SND

Post by Void Weaver »

Ninjad by Tartlman :)

2) Probably you should use 255 value instead of 256.
4)
Void Weaver wrote:b) make sure that a sound channels defined inside of each A_PlaySound, especially if it's a looped sound.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: I can't figure out a few issues with my Decorate and SND

Post by Blue Shadow »

Regarding #2: Death alone isn't enough for an actor to drop its items. [wiki]A_NoBlocking[/wiki] is needed to be called somewhere in the death sequence to make that happen.
Post Reply

Return to “Scripting”