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 → soundtrack .cog
soundtrack .cog
2001-04-23, 1:55 PM #1
Well heres a .cog that plays a .wav as a background soundtrack. There is a problem with the volume however. When the level first starts, it plays fine with normal volume. When the player dies, however, and the level restarts, the song restarts and the volume is reduced drastically. I have no idea why this happens, but maybe someone here can figure it out:
# Jedi Knight Cog Script
#
# sndtrack.cog
#
#
#
# This Cog is Not supported by LucasArts Entertainment Co

symbols

message startup

sound music=fanfare2.wav

int player local

end

# ========================================================================================

code

startup:

player = GetLocalPlayerThing();

playsoundlocal(music, 1, 0, 0x1);

return;

end
"Flash like daybreak to the fray"
Raccoonking: Deeznuts are tasty!http://www.geocities.com/joshroxby/
2001-04-23, 3:31 PM #2
I don't know why the sound level is affected. The "int player local" and "player = GetLocalPlayerThing();" aren't used for anything in that cog. Is this for multiplayer of single player?

------------------
Sylvicolus JK homepage
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton

[This message has been edited by Sylvicolus (edited April 23, 2001).]
Sylvicolus JK homepage
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton
2001-04-23, 7:24 PM #3
This is for single player only. I thought that I took those out and it didnt work so I put them back in...maybe not. Well Ill try it without them anyway. If someone could just write me a quick .cog to play a .wav as a soundtrack in single player, that'd be great! [http://forums.massassi.net/html/smile.gif]
"Flash like daybreak to the fray"
Raccoonking: Deeznuts are tasty!http://www.geocities.com/joshroxby/
2001-04-23, 7:31 PM #4
ok I just took out those 2 lines and it still works. Thanks. However, its still having the volume problem [http://forums.massassi.net/html/frown.gif] [http://forums.massassi.net/html/frown.gif]
"Flash like daybreak to the fray"
Raccoonking: Deeznuts are tasty!http://www.geocities.com/joshroxby/
2001-04-24, 12:46 PM #5
Another suggestion would be to putting a Sleep(1.0); statement before the starting the sound -- just a thought. It is done for some other cogs so that it gives the system time to start up before the cog is active.

------------------
Sylvicolus JK homepage
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton
Sylvicolus JK homepage
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton
2001-04-24, 2:49 PM #6
That did it! You ARE all that and a bag of chips!
"Flash like daybreak to the fray"
Raccoonking: Deeznuts are tasty!http://www.geocities.com/joshroxby/
2001-04-24, 2:57 PM #7
Wow, glad that that guess worked! You can e-mail me some potato chips at your earliest convenience. [http://forums.massassi.net/html/smile.gif]


------------------
Sylvicolus JK homepage
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton
Sylvicolus JK homepage
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton

↑ Up to the top!