ArcBasicDocs

CreateListener

Creates the 3D sound listener.

CreateListener ( parent[,rolloff_factor#][,doppler_scale#][,distance_scale#] )

Parameters

parent
the entity to attach it to, usually the camera, or 0 for none.
rolloff_factor# (optional)
how quickly sounds fade with distance: higher fades faster. Defaults to 1.
doppler_scale# (optional)
how strongly the pitch of moving sounds changes, as a passing siren does. Defaults to 1.
distance_scale# (optional)
how big a unit of the world is, for the sound: higher makes distances count for more. Defaults to 1.

Description

Creates the listener: the ears of a 3D world, usually attached to the camera. Sounds played with EmitSound are heard as if from where it is. Gives back its handle, an entity like any other.

See also