GSC reference › Built-in
AllocateSoundRandoms()
Built-in (engine)
Client
Allocate a pool of random sounds
Signature
AllocateSoundRandoms(<num randoms>)
Parameters
| Name | Required? | Details |
|---|---|---|
| num randoms | Required | number of randoms |
Example (from Treyarch's docs)
AllocateSoundRandoms(randoms.size - nScriptThreadedRandoms)
Real uses in BO3's scripts
Called 1 time in the decompiled scripts. A few, zombies first:
- scripts/shared/audio_shared.csc, line 395
allocatesoundrandoms(randoms.size - nscriptthreadedrandoms);
Related built-ins
- PlaySound()Play the sound at the entity
- PlaySoundAtPosition()Play the sound alias from a position
- PlayLoopSound()Play a looping sound with an optional fadetime in seconds.
- StopLoopSound()Stops the looping sound with an optional fadetime.
- PlaySoundToPlayer()Play the sound alias as if coming from the entity, so that only one player can hear it
- PlaySoundWithNotify()Play the sound alias as if coming from the entity
- PlayLocalSound()Plays a sound locally
- StopAllLoopSounds()Stops a loop sound
- StopSounds()Stop all sounds on an entity.
- PlaySoundOnTag()Play the sound alias as if coming from the tag
- SetSoundContext()Set the sound context
- SoundLoopEmitter()Play a sound loop at the position
New to GSC?
Start with the basics, or paste a compile error to get the fix.
Built-in descriptions, parameters and examples come from Treyarch's BO3 mod tools docs. Usage links point at shiversoftdev/t7-source (decompiled BO3 scripts).