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 → Newbie editor with very basic sound cog problem
Newbie editor with very basic sound cog problem
2002-12-03, 4:58 PM #1
My problem is that in JK I can't get the random ambiet sound cog, or the music sound track cog to work.

YES!! I HAVE DONE THE TUTORIALS ON SOUND AND FOLLOWED THEM TO THE LETTER. Is there something else that I have to do that is not mentioned in the tutorials. It is probably something basic but because I am new I just don't know.

Perhaps someone can explain it to me even more simply, you know, like explaining it to a 4 yr old!!
2002-12-04, 2:50 PM #2
erm, well i dont know what exactly ur talking about but here is a cog that lets u hit a thing and a sound plays

#12-4-02
#TQB
symbols
thing object
sound song
message activated
end
code
activated:
PlaySoundLocal(song);
return;
end


lol, its been a while since ive done jk ediitng
-------------------------
It's Me, It's Me, It's TQB
-------------------------
2002-12-04, 5:24 PM #3
Uhh . . . TB . . . that is NOT going to work. Consult your copy of the JKspecs/Datamaster . . Playsoundlocal() has 4 args; the sound, the volume, panning, and the play flags. All are mandatory.


Code:
Symbols
Message Activated
Thing Console
Sound Sample
End
Code
Activated:
Playsoundlocal(Sample, 1, 0, 0);
Stop;
End


That one will work.

And Brad, . . might I ask, are you using custom sounds, perchance created with MS' Sound Recorder?
And when the moment is right, I'm gonna fly a kite.
2002-12-05, 2:26 PM #4
=) same thing
-------------------------
It's Me, It's Me, It's TQB
-------------------------
2002-12-05, 3:18 PM #5
Nope, sorry. I'm not trying to use custom sounds guys.
Only the ones supplied.

Thanks for your help. I'll try your suggested cog GBK.

The names of the cogs that I can't get to work are "01_soundtrack.cog" & "16a_randomabient.cog"

any help with thees two would be great.
thanks.
2002-12-05, 5:28 PM #6
Well, try these.

Code:
# Generic soundtrack cog.
#
# 12/2002 GBK
Symbols
Message Startup
Int Initial=2			#What track to start on?
Int Ending=5		#End on what track?
Int Loop=2	#Loop to what track?
End
Code
Startup:
Playsong(Initial, Ending, Loop);
Stop;
End


Code:
# Generic 'Random ambient' cog.
#
# 12/2002 GBK
Symbols
Message Startup
Message Pulse
Sound Sound0
Sound Sound1
Sound Sound2
Sound Sound3
Sound Sound4
Sound Sound5
Sound Sound6
Sound Sound7
Sound Sound8
Sound Sound9
Int Numused=0		#How many used wavs?
Flex Volume=1
Flex Volume_flex=0.5		#Vary volume by how much?
Flex Time=10		#Amount of time between each playing.
Flex Time_flex=5	#Vary time by how much?
End
Code
Startup:
Setpulse(Time + (Rand()*Time_flex));
Stop;
Pulse:
Playsoundlocal(Sound0[Rand()*Numused], Volume+(Rand()*Volume_flex), 0, 0);
Setpulse(Time + (Rand()*Time_flex));
Stop;
End


Credit me. [http://forums.massassi.net/html/tongue.gif]

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

GBK oNline. Cogs, tuts, and total w00tage.
And when the moment is right, I'm gonna fly a kite.
2002-12-06, 8:36 AM #7
lol
-------------------------
It's Me, It's Me, It's TQB
-------------------------
2002-12-06, 9:06 AM #8
What? [http://forums.massassi.net/html/confused.gif]
And when the moment is right, I'm gonna fly a kite.
2002-12-06, 9:16 AM #9
=/ que
-------------------------
It's Me, It's Me, It's TQB
-------------------------

↑ Up to the top!