StartSound (script event)

Game class

This event operates on an instance of the game class type {{{gameclass}}}


Plays the sound specified by the snd_* key/value pair on the channel and returns the length of the sound.


float startSound( string sound , float channel , float netSync )


  • [sound] - The sound to play from this entity.
  • [channel] - The channel to play this sound on.
  • [netSync] - Whether to play this sound across the network or not.


$my_entity.startSound("snd_target_lost", 1, 1);


This script event does not return any values.

This is the preferred method for playing sounds on an entity since it ensures that the sound is precached.