Spoiler:
In SNDInfo:In enemy's .txt code:Code: Select all
$random mook/death { dgrscream dgrscream dprscream dprscream dscream1 dscream1 dscream2 dscream2 dscream3 dscream3 dscream4 dscream4 dscream5 dscream5 dscream6 dscream6 dscream7 dscream7 dscream8 dscream8 dscream9 dscream9 } dgrscream dgrscream dprscream dprscream dscream1 dscream1 dscream2 dscream2 dscream3 dscream3 dscream4 dscream4 dscream5 dscream5 dscream6 dscream6 dscream7 dscream7 dscream8 dscream8 dscream9 dscream9Code: Select all
actor NGuard replaces ZombieMan { scale 1.1 spawnid 4 obituary "%o was capped by a pistoleer." health 20 radius 20 height 56 mass 100 speed 8 painchance 200 seesound "NVA/Sight" painsound "mook/Pain" deathsound "mook/Death" activesound "" dropitem "TT33" 256 DamageFactor "Enemy", 0.0 MONSTER +FLOORCLIP +NOTARGET +NOINFIGHTING states { Spawn: NVGD N 10 A_Look loop See: NVGD AABBCCDD 4 A_Chase loop Missile: NVGD EF 5 A_FaceTarget NVGD G 0 A_PlayWeaponSound("attack/tt33") NVGD G 8 BRIGHT A_CustomMissile("EnemyPistolTracer",32,0,random(-8,8)) NVGD F 8 goto See Pain: NVGD H 3 NVGD H 3 A_Pain goto See Death: NVGD I 5 NVGD J 5 A_Scream NVGD K 5 A_NoBlocking NVGD L 5 NVGD M -1 stop Raise: NVGD MLKJI 5 goto See Idle: NVGD AA 4 A_Wander NVGD A 0 A_Look NVGD BB 4 A_Wander NVGD A 0 A_Look NVGD CC 4 A_Wander NVGD A 0 A_Look NVGD DD 4 A_Wander NVGD A 0 A_Look loop } }
Not playing death sounds?
					Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
	Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Not playing death sounds?
I've encountered a strange error when trying to code enemies. When the enemies die, sometimes they scream and sometimes they don't. How do I fix it?
			
			
									
						
										
						Spoiler:
- 
				Blue Shadow
- Posts: 5046
- Joined: Sun Nov 14, 2010 12:59 am
Re: Not playing death sounds?
Your dgrscream and dprscream sounds (files/lumps) have a file name length that exceeds the length limit of 8 characters (they're 9-character long).
If you're using the ZIP/PK3 structure for your mod and you don't want to reduce the file name's length, you can use long names, provided you specify the path and extension of the sound file. Example:
			
			
									
						
										
						If you're using the ZIP/PK3 structure for your mod and you don't want to reduce the file name's length, you can use long names, provided you specify the path and extension of the sound file. Example:
Code: Select all
dgrscream "sounds/enemies/screamymonster/dgrscream.ogg"