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

zdoom - sound is looping ?

Recommended Posts

Hello guys,

I try to add a sound that have duration of 10 sec, but it doesnt play to the end. its just looping with the 1-2 sec from the beginning. any idea ?

here my decorate:

States
{
Spawn:
SUC1 AB 10 Bright A_Look
Loop
See:
TNT1 A 0 A_PlaySound("pyr/wings")

TNT1 A 0 A_ChangeFlag("FLOAT",0)
TNT1 A 0 A_ChangeFlag("NOGRAVITY",0)
TNT1 A 0 A_ChangeFlag("DROPOFF",0)
SUC1 AA 4 Bright A_Chase
SUC1 A 0 Bright A_SpawnItemEx("WalkFire1",0,0,0,1,0,0,0,128)
SUC1 BB 4 Bright A_Chase
SUC1 B 0 Bright A_SpawnItemEx("WalkFire1",0,0,0,1,0,0,0,128)
SUC1 CC 4 Bright A_Chase
SUC1 C 0 Bright A_SpawnItemEx("WalkFire1",0,0,0,1,0,0,0,128)
SUC1 DD 4 Bright A_Chase
SUC1 D 0 Bright A_SpawnItemEx("WalkFire1",0,0,0,1,0,0,0,128)
SUC1 A 0 A_Jump(32,"Grav")
Loop

Share this post


Link to post

Of course, because you are looping the state with PlaySound. Add another label (named anyhow, for example "See2:") right after the state with PlaySound, that will make the Loop command loop from that point onwards.

Share this post


Link to post

I see :)

it work now, thanks :)

the sound continue playing when the monster is injured and when he is dead, there is a way to make the sound stop/continue in this cases ?

Share this post


Link to post

Play the sound on a unique slot (not auto) and then use A_PlaySound again in the pain and death animations to play another (silent) sound on the same slot, which will override (stop) the previous sound.

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
×