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 → I'm having problems with a simple music cog.
I'm having problems with a simple music cog.
2004-04-02, 3:24 PM #1
Code:
# Simple cog to loop a bit of music ingame
# 03/2004 gbk
Symbols
Message Startup
Sound Music
End
Code
Startup:
Playsoundglobal(Music, 1, 0, 0x1);
Stop;
End


Well, as you can see, it's as simple as it gets (it's multiplayer btw). I seem to have a slight problem though. While the music I'm using play's fine in regualar Jedi Knight, I can't be sure if it can can be heard by the other players as well as the host. If there's some simple way to synch it for universal, continuous play in mp, I'd be much obliged.

Another slight issue, is the music doesn't seem to play at all with other mods. I tried out the level with SSR 4000 Pro, and there was none to be heard whatsoever. If there is a way someone knows how to correct these marginal errors, I'd be much obliged if they took a moment to modify the code.

Thanks! [http://forums.massassi.net/html/biggrin.gif]


------------------
~ Vader's Corner ~ The place to submit your poetical works!
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-04-02, 8:53 PM #2
Here's an idea. Before symbols, add flags=0x240, then change PlaySoundGlobal to PlaySoundLocal.

As for your mod issue, I don't know...

/Edward


[This message has been edited by Edward (edited April 02, 2004).]
Edward's Cognative Hazards
2004-04-03, 10:57 AM #3
Local? But that would have the opposite effect wouldn't it? Either that or whoever wrote that bit of cog was dyslexic. I'm sorry that just doesn't make sense to me - perhaps you could explain Edward. Thanks.

As for any reason why the music didn't work with the mod, anyone got any ideas? It's occurred to me that maybe it had something to do with the fact SSR 4000 Pro comes with music, that can be played via a hotkey. I guess I could check the level with a mod not containing music? [http://forums.massassi.net/html/confused.gif]

------------------
~ Vader's Corner ~ The place to submit your poetical works!
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-04-03, 11:10 AM #4
Yep. It turns out SSR 4000's music may have had something to do with it, 'cuz the music played fine with SBX 3.0

Well, I guess it's not a major issue, now I would just appreciate it if Edward could explain to me what I'm supposed to do and how it works. Forgive my newbieishness (intersting word).

------------------
~ Vader's Corner ~ The place to submit your poetical works!
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-04-03, 9:24 PM #5
OK... Now, you're making a level where you place a music COG. Now, the COG isn't attached to any player, and so 0x240 would be local, to all players. I'm sure of this. I've done it before... Look for my level called Pipe Lines, and look for a COG called modding.cog. That COG is local, and it works on all players. I know, I've tried it.

/Edward
Edward's Cognative Hazards
2004-04-03, 11:04 PM #6
Edward is right. It makes no sense to synchronize music for all players. Or are you planning to create some kind of dance game, where you have to do the right moves according to the music?

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2004-04-04, 9:18 AM #7
Thanks, I'll post the new code and you can tell me if it's correct
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


Is spacing and stuff okay?




------------------
~ Vader's Corner ~ The place to submit your poetical works!
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-04-05, 12:07 AM #8
Quote:
<font face="Verdana, Arial" size="2">Originally posted by Daft_Vader:
...Is spacing and stuff okay?</font>


Heh, spacing in cog is irrelevent. JK ignores whitespace. In fact, you could put the whole cog on one line and JK wouldnt care...

------------------
The future is here, and all bets are off.
And when the moment is right, I'm gonna fly a kite.
2004-04-05, 4:05 AM #9
Quote:
<font face="Verdana, Arial" size="2">GBK
In fact, you could put the whole cog on one line and JK wouldnt care...
</font>

Not intirely true. The symbols still need new lines because they don't have ;.
Edward's Cognative Hazards
2004-04-05, 9:37 AM #10
...Hrm, true...

------------------
The future is here, and all bets are off.
And when the moment is right, I'm gonna fly a kite.
2004-04-06, 11:56 AM #11
Skill Points:
+1 Edward;
-1 GBK;

I believe GBK has just earnt an official " [http://forums.massassi.net/html/tongue.gif]" from Edward... [http://forums.massassi.net/html/wink.gif] [http://forums.massassi.net/html/biggrin.gif]

-Jackpot

[There's always one smart-a$$ isn't there... GBK [http://forums.massassi.net/html/wink.gif] ]

------------------
"lucky_jackpot is the smily god..." - gothicX

"Life is mostly froth and bubble,
But two things stand in stone,
Kindness in another's trouble,
Courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)
"lucky_jackpot is the smily god..." -gothicX
"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
- "Ye Wearie Wayfarer"
|| AI Builder: compatible with both JK & MotS || My website ||

↑ Up to the top!