These are cog verbs dealing with sound
ChangeSoundPitch ChangeSoundVol GetSoundLen PlaySong PlaySoundClass PlaySoundGlobal PlaySoundLocal PlaySoundPos PlaySoundThing SectorSound SetMusicVol StopSound |
Changes a sound's pitch over time.
Use: ChangeSoundPitch(int channel, flex NewPitch, flex ChangeTime);
Changes the sound volume.
Use: ChangeSoundVol(int ref , flex volume, flex FadeInTime);
Returns the length of a sound. Helps keep dialouges in order within the game.
Use: GetSoundLen(wav);
Example: Sleep(GetSoundLen(wav)); This will sleep the cog until the sound is finished playing.
Inputs the CD values for playing music.
Use: PlaySong(int starttrack, int endtrack, int loopinto);
? Not Used in JK
?
Plays a sound to everyone in a Multiplayer game . See Sound Flags
Use: channel = PlaySoundGlobal(wav , flex volume, flex pan ,int flags); pan is -1.0=full left , 1.0 full right , 0.0 center
Plays a sound locally on the local computer only See Sound Flags
Use: channel = PlaySoundLocal(wav,flex volume, flex pan ,int flags); pan is -1.0=full left , 1.0 full right , 0.0 center
Plays a sound from a designated vector referenced location.. May be used with things, surface centers, etc... See Sound Flags
Use: PlaySoundPos(wav, vector position, flex volume, flex mindistance, flex maxdistance, flags);
Use of Pos: Here are two methods to get a pos.
For a thing: GetThingPos(thing);
For a surface: GetSurfaceCenter(surface);
Plays a sound linked to a thing. See Sound Flags
Use: PlaySoundThing(sound, thing, vol flex, flex mindist, flex maxdist, flag);
Plays a sound from designated sector.
Use: SectorSound(sector, wav, flex volume);
Sets the volume for the CD Track that is currently playing. Used when dialogues play to make them audible.
Use: SetMusicVol(flex volume);
Stops a sound from being played on the passed channel.
Use: StopSound(int channel, flex FadeOut);