Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Very Slight Music Cog Problem
Very Slight Music Cog Problem
2004-12-19, 2:20 PM #1
My level plays a looping background music, but I've noticed that when I die and respawn, the music doesn't start back up again. Here's the cog:
Code:
# Simple cog to loop a bit of music ingame
# 03/2004 gbk
flags=0x240
Symbols
Message Startup
Sound Music
End
Code
Startup:
Playsoundlocal(Music, 1, 0, 0x1);
Stop;
End

Also keep in mind this is for MultiPlayer, so the cog needs to be local. If you can simply tweak this cog, please by all means do. :)
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-12-19, 3:35 PM #2
Replace Startup with the Newplayer message?
-Hell Raiser
2004-12-19, 9:05 PM #3
You mean the music stops after you respawn?

0_o ^ infinity

Are you testing via the debug menu or via the actual MP setup?
It probably matters not... *shrug*

Put a sleep(0.25) before your playsoundlocal() and see if that helps.
May the mass times acceleration be with you.
2004-12-19, 9:13 PM #4
Code:
# Simple cog to loop a bit of music ingame
# 03/2004 gbk
flags=0x240
Symbols
Message Newplayer
Sound Music
End
Code
Newplayer:
Playsoundlocal(Music, 1, 0, 0x1);
Stop;
End
And when the moment is right, I'm gonna fly a kite.
2004-12-20, 9:21 AM #5
Thanks gbk, but I tried the new cog and the music never even started playing from startup. It just wasn't to be heard, even after I died. Possible causes/fixes?
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-12-20, 9:58 AM #6
Code:
# Simple cog to loop a bit of music ingame
flags=0x240
Symbols
Message Startup
Message Pulse
Sound Music
End
Code
Startup:
Playsoundlocal(Music, 1, 0, 0x1);
SetPulse(.01);
return;

Pulse:
if((GetThingHealth(GetLocalPlayerThing()) <= 0) || (GetActorFlags(GetLocalPlayerThing()) & 0x8)){
Playsoundlocal(Music, 1, 0, 0x1);
return;
End
_ _ _____________ _ _
Wolf Moon
Cast Your Spell On Me
Beware
The Woods At Night
The Wolf Has Come
2004-12-20, 4:23 PM #7
Still not working. =/
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-12-20, 5:40 PM #8
Code:
# Simple cog to loop a bit of music ingame
# 03/2004 gbk
flags=0x240
Symbols
Message Startup
Message Newplayer
Sound Music
End
Code
Startup:
Newplayer:
Playsoundlocal(Music, 1, 0, 0x1);
Stop;
End
And when the moment is right, I'm gonna fly a kite.
2004-12-20, 6:35 PM #9
Thankyou gbk. I seem to have had some success with this cog. The music is now at least playing initially again, but it still refuses to restart once the player dies. This is really perplexing...

:confused:
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels

↑ Up to the top!