Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
22Alpha22

Decorate Problems

Recommended Posts

I am having two problems with zdoom decorate. First I added a new monster, and it works fine except its sounds keep looping even after death. Here is the code.
//===================================================================
//
// Pig Cop
//
//===================================================================

Actor PigCop 3245
{
Health 150
Radius 33
Height 79
Speed 8
PainChance 200
MONSTER
+FLOORCLIP
SeeSound "pig1/see"
AttackSound "pig1/attack"
DeathSound "pig1/die"
PainSound "pig1/pain"
ActiveSound "pig1/active"
Obituary "%o was subdued by a Pig Cop!"
DropItem "Shotgun"
States
{
Spawn:
PIG1 AB 10 A_Look
Loop
See:
PIG1 AABBCCDD 3 A_Chase
Loop
Missile:
PIG1 E 10 A_FaceTarget
PIG1 F 10
PIG1 G 10 BRIGHT A_SposAttackUseAtkSound
PIG1 E 10
Goto See
Pain:
PIG1 F 3
PIG1 F 3 A_Pain
Goto See
Death:
PIG1 H 5
PIG1 I 5 A_Scream
PIG1 J 5 A_NoBlocking
PIG1 K 5
PIG1 L 5
PIG1 M 5
PIG1 M -1
Stop
Raise:
PIG1 L 5
PIG1 KJIH 5
Goto See
}
}

The second problem is about a weapon. A submachine gun I added has a
grenade launcher for an alt attack. It works fine except when you fire the grenades, they don't deplete ammo. Therefore you have unlimited grenades, which is not what I want.

// ------------------------------------------------------------------
//
// Sub Machinegun
//
// ------------------------------------------------------------------

ACTOR Chaingun : Weapon 3225
{
Decal BulletChip
Weapon.AmmoUse 1
Weapon.AmmoGive 30
Weapon.AmmoType "Clip"
Weapon.AmmoType2 "Grenades"
Weapon.AmmoGive2 1
Weapon.AmmoUse2 2
Inventory.PickupSound "subm/pickup"
Inventory.PickupMessage "You got the submachine gun!"
Obituary "$OB_MPCHAINGUN"
States
{
Ready:
CHGG A 1 A_WeaponReady
Loop
Deselect:
CHGG A 1 A_Lower
Loop
Select:
CHGG A 1 A_Raise
Loop
Fire:
CHGG AB 4 A_FireCGun
CHGG B 0 A_ReFire
Goto Ready
AltFire:
CHG1 A 2
CHG1 B 0 A_GunFlash
CHGG A 0 A_FireCustomMissile("PisCaseSpawn",0,0,-6,-8)
CHG1 B 0 A_PlayWeaponSound("weapons/grenlau")
CHG1 B 5 A_ThrowGrenade("GrenadeShot",-4,13,9,0)
CHG1 C 5
CHG1 D 5
CHG1 A 4
CHG1 A 3 A_ReFire
Goto Ready
Spawn:
MGUN A -1
Stop
}
}

ACTOR GrenadeShots
{
Radius 4
Height 3
Damage 1
+NOBLOCKMAP
+DROPOFF
+MISSILE
+ACTIVATEIMPACT
+ACTIVATEPCROSS
+DOOMBOUNCE
SeeSound "sol1/grn"
DeathSound "weapons/grenexpl"
ExplosionDamage 160
ExplosionRadius 192
States
{
Spawn:
GRNS AB 3
Loop
Death:
GRNE A 2 Bright A_Explode
GRNE BCDEFGHIJKLMN 3 Bright
Stop
}
}

I fixed the sndinfo but the sound still loops.

Share this post


Link to post
22Alpha22 said:

I am having two problems with zdoom decorate. First I added a new monster, and it works fine except its sounds keep looping even after death. Here is the code.

Which sounds?

Also, what's your SNDINFO lump?

22Alpha22 said:

The second problem is about a weapon. A submachine gun I added has a grenade launcher for an alt attack. It works fine except when you fire the grenades, they don't deplete ammo. Therefore you have unlimited grenades, which is not what I want.

Your "useammo" parameter in the A_ThrowGrenade call is set to 0, or false. Set it to 1.

Share this post


Link to post

The active sounds and the death sounds.

//Pig Cop
pig1/attack dsshotgn
pig1/see pig1see
pig1/active pig1acti
pig1/pain pig1pain
pig1/die pig1die

Thanks for the help on the submachine gun.

Share this post


Link to post

not sure if it has much to do with it, you put "pig1/die pig1die" in SNDINFO, but have DeathSound "pig1/death" on the pigcop.

Share this post


Link to post

What happens if you type "playsound soundname" at the console for the problem sound? The reason I ask is that WAV files can have instructions inside them to loop the sound and Zdoom will respond to this.

Someone had this exact same problem a little while back. On that occasion, simply opening the files and saving them again in a WAV editor removed the loop information and fixed the problem.

Share this post


Link to post

Zdoom does not play the sound with the console cammand and I tried edditing the sound and reloading it, but it still looped. The sound does not loop outside the game.

Share this post


Link to post

Typing

playsound pig1/die

(or whichever sound you were trying to play) at the console doesn't play your sound? Then something is definitely wrong because Zdoom should play it like that. Recheck to make sure that you are typing the sound name exactly as you have spelled it in sndinfo.

As for the not looping outside Zdoom, that may not be conclusive proof. Although WAV files can have these inbuilt loops, I have found very few programs that support them: zdoom being one of the few.

Share this post


Link to post

I found the solution to the problem. I looked at the sounds in XWE and it showed that they were 16 bit Stereo sounds. Doom uses 8 bit mono sounds. I opened the sounds with Sound Recorder and converted them to 8 bit mono and they did not loop in Zdoom anymore!

Share this post


Link to post
22Alpha22 said:

I found the solution to the problem. I looked at the sounds in XWE and it showed that they were 16 bit Stereo sounds. Doom uses 8 bit mono sounds. I opened the sounds with Sound Recorder and converted them to 8 bit mono and they did not loop in Zdoom anymore!


I have run into this problem, but with ambient sounds used in scripts rather than monster sounds. This might explain a lot. Thanks for this. :)

Share this post


Link to post
22Alpha22 said:

I found the solution to the problem. I looked at the sounds in XWE and it showed that they were 16 bit Stereo sounds. Doom uses 8 bit mono sounds.

Seriously, I bet it had nothing to do with that. You're using Zdoom and it can quite happily cope with 16 bit stereo sounds. in fact, I just converted an entire 4 minute long MP3 to a 16 bit stereo WAV, saved it as DSPOSIT1 and then listened to the whole thing play in glorious stereo when I woke up a zombieman in map01.

22Alpha22 said:

I opened the sounds with Sound Recorder and converted them to 8 bit mono and they did not loop in Zdoom anymore!

As I said, there is probably some looping information saved in the WAV and simply opening it and resaving it should fix the problem.

Enjay said:

The reason I ask is that WAV files can have instructions inside them to loop the sound and Zdoom will respond to this.

...On that occasion, simply opening the files and saving them again in a WAV editor removed the loop information and fixed the problem.


See. :P

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×