AudioSource3D

The AudioSource3D entity is used to place a point-source of sound. All AudioSource3D sounds loop, and have an audible radius beyond which the sound is no longer heard. The sound will fade in volume the further the player is from the entity. The audio file must be in WAV format.

Field Descriptions

The fields for the AudioSource3D entity are:

Field Description
bLoopSound True or False to loop audio
BoneName Name of actor bone to attach to
EntityName Name of the entity to attach this entity to
fRadius Maximum distance after which sound cannot be heard
Model Name of the world model to attach to
szEntityName Name of this entity
szSoundFile Name of the sound file to play
TriggerName Name of trigger entity

For more information on attaching the AudioSource3D entity to another entity or model see Attaching Entities to an Actor, Player, or Model.

If there is a name in the TriggerName entry then the sound will only play if the state of the trigger is on. Each time the trigger activates the sound it is started at the beginning.

Examples

Here are several examples of AudioSource3D entities in various configurations.

Example1 Example2
Example #1 plays the sound laughter3.wav any time the player is within 200 texels of the entity. This sound loops continuously.
Example #2 plays the sound only if the state of the triggering entity, trigger1, is on and the player is within 200 texels of the AudioSource3D entity.
Example3
Example #3 is attached to the bone named Bone01 of the actor in the entity named MovingMan. It will move with this entity and the sound will be heard if the player is within 200 texels of that actor bone.