PlaySound
Plays one of the game’s sounds at a point for everyone nearby.
trigger is an audio trigger of the game’s sound banks by name - lightning, c_neck_snap, male_spit,
special_barber_scissors … (the audio triggers list all 15,000) - played the game’s own way from a short-lived emitter at the point:
each player hears it from where it is. The emitter stays seconds (0 = 10); a looping trigger ends with it. The same
reach and return as SpawnEffect.
Syntax
Section titled “Syntax”PlaySound(trigger, x, y, z [, seconds, world])| Parameter | Type | |
|---|---|---|
trigger |
string | the audio trigger’s name |
x |
number | metres |
y |
number | metres |
z |
number | metres |
seconds |
number | how long the sound source stays; 0 = 10 (optional) |
world |
number | the virtual world (0) (optional) |
Returns
Section titled “Returns”number - how many players heard it
Example
Section titled “Example”-- thunder over the arena as the round startsPlaySound("lightning", arenaX, arenaY, arenaZ + 20)See also
Section titled “See also”SpawnEffect · GameTextForAll · the Effects and sounds group of the index
