ent_playsound ( ENTITY*, SOUND*, var volume): handle

ent_playsound2 ( ENTITY*, SOUND*, var volume, var range): handle

Plays a 3D sound at the current position of the given entity.

ent_playloop ( ENTITY*, SOUND*, var volume): handle

ent_playloop2 ( ENTITY*, SOUND*, var volume, var range): handle

Plays a 3D sound in an endless loop until it is stopped explicitly. The sound source moves together with the entity.

Parameter:

ENTITY* Entity pointer.
SOUND* SOUND object pointer.
volume sound volume in percent (0..1000), and range in 10 quant units (0..10000).
range range in quants (0..100000).

Returns:

Sound handle.

Remarks:

Example:

SOUND* whosh = "whosh.wav";
var whosh_handle;
...
whosh_handle = ent_playloop(my,whosh,100);

See also:

snd_play, snd_create, snd_tune, snd_playing, doppler_factor, reverb effects

► latest version online