- Joined
- Aug 13, 2007
- Messages
- 309
How do I make it so that when a player zooms out in my map (it's not even that far, like distance 50.0 or 60.0 at max) it doesn't making everything go silent? I hate how when I want to see more units at once I can't hear their fighting because the sound just cuts off...
JASS:
//--------------------------------------------------------------------------------------------------
// Sound
//
// - A specific sound index within the sound list may be specified.
// Using c_soundIndexAny will choose a sound either sequentially or randomly,
// based on the sound data.
//
// - Use a "null" playergroup to play the sound for all players.
//
// - 3d sounds are only played for players who currently have vision of the sound position.
//
// - Volumes are expressed as a percent (0-100) of maximum volume.
//--------------------------------------------------------------------------------------------------
const int c_soundIndexAny = -1;
// Sound Info
native soundlink SoundLink (string soundId, int soundIndex);
native string SoundLinkId (soundlink soundId);
native int SoundLinkAsset (soundlink soundId);
// Sound
native void SoundPlay (
soundlink link,
playergroup players,
fixed volume,
fixed offset
);
native void SoundPlayAtPoint (
soundlink link,
playergroup players,
point inPoint,
fixed height,
fixed volume,
fixed offset
);
native void SoundPlayOnUnit (
soundlink link,
playergroup players,
unit inUnit,
fixed height,
fixed volume,
fixed offset
);
// - SoundPlayScene attempts to synchronize unit animations with the sound duration
native void SoundPlayScene (
soundlink link,
playergroup players,
unitgroup units,
string animProps
);
native void SoundPlaySceneFile (
soundlink link,
playergroup players,
string sceneFile,
string camera
);
native sound SoundLastPlayed ();
native void SoundPause (sound s, bool pause);
native void SoundStop (sound s, bool fade);
native void SoundStopAllModelSounds ();
native void SoundStopAllTriggerSounds (bool fade);
native void SoundSetVolume (sound s, fixed volume);
native void SoundSetPosition (sound s, point position, fixed height);
const int c_soundOffsetStart = 0;
const int c_soundOffsetEnd = 1;
native void SoundSetOffset (sound s, fixed offset, int offsetType);
native void SoundWait (sound s, fixed offset, int offsetType);
native void SoundAttachUnit (sound s, unit u, fixed height);
// Sound Lengths
// - Note: Since sound files are localized and potentially different for each player,
// a network query must be sent to all players, and all results must be
// received before a synchronous result can be accessed.
//
// SoundLengthQuery - Initiate a network query for the given sound
//
// SoundLengthQueryWait - Pause the current thread until all outstanding sound length
// query results have been synchronized
//
// SoundLengthSync - Retrieve the synchronized sound length result for the given
// sound
//
native void SoundLengthQuery (soundlink info);
native void SoundLengthQueryWait ();
native fixed SoundLengthSync (soundlink info);
// Sound channels
native void SoundChannelSetVolume (playergroup players, int channel, fixed volume, fixed duration);
native void SoundChannelMute (playergroup players, int channel, bool mute);
native void SoundChannelPause (playergroup players, int channel, bool pause);
native void SoundChannelStop (playergroup players, int channel);
// Other properties
native void SoundSetReverb (string inReverbLink, fixed inDuration, bool inAmbient, bool inGlobal);
native void SoundSetFactors (fixed distance, fixed doppler, fixed rolloff);
native text SoundSubtitleText (soundlink link);
//--------------------------------------------------------------------------------------------------
// Soundtracks
//--------------------------------------------------------------------------------------------------
const int c_soundtrackCueAny = -1;
const int c_soundtrackIndexAny = -1;
native void SoundtrackDefault (playergroup players, int category, string soundtrack, int cue, int index);
native void SoundtrackPlay (playergroup players, int category, string soundtrack, int cue, int index, bool makeDefault);
native void SoundtrackPause (playergroup players, int category, bool pause, bool fade);
native void SoundtrackSetContinuous (playergroup players, int category, bool continuous);
native void SoundtrackSetDelay (playergroup players, int category, fixed delay);
native void SoundtrackStop (playergroup players, int category, bool fade);
native void SoundtrackWait (string soundtrack);
Last edited: