GSC reference › Built-in

PlaySoundOnTag()

Built-in (engine) Server Called on: entity

Play the sound alias as if coming from the tag

Signature

<entity> PlaySoundOnTag(<aliasname>, [tag], [team], [ent])

Called on an entity: entity PlaySoundOnTag(...)

Parameters

NameRequired?Details
aliasnameRequired The sound alias to play, this can be the string name, or the integer hash
tagOptional If present, the sound will play at the position of the given tag
teamOptional If present or not undefined the sound will only be heard by the specified team
entOptional If present the sound will also be heard on the specified entity

Example (from Treyarch's docs)

self PlaySoundOnTag( soundAlias, "J_Head")

Real uses in BO3's scripts

Called 46 times in the decompiled scripts. A few, zombies first:

Related built-ins

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).