SoundSource
A sound that plays over and over where its entity is: a waterfall, a crackling fire, a humming machine. It’s loudest close to the middle of the screen and fades out by Range, and comes from the left or the right speaker as it’s to that side. A Switch turns it on and off.
Properties
Section titled “Properties”Each is listed as its key in the scene file and the MCP tools, then its kind of value, its default and what it does.
sound: text = null. The sound to loop, e.g. “Sounds/waterfall.wav”. (A sound in Assets, e.g. “Sounds/hit.wav”.) (Field: a sound.)volume: a number = 1. How loud it is up close, 0 to 1, on top of the game’s sound volume. (Field: a number.)range: a number = 10. How far away it can be heard, in world units. 0 plays it at full volume everywhere (rain, wind). (A distance: the Scene view draws it as a circle around the entity, with a handle to drag.) (Field: a number.)playing: true or false = true. True while it plays. Untick it to start silent; switches and scripts can set it. (Field: on or off.)pitch: a number = 1. 1 as recorded, 2 an octave up, 0.5 an octave down. Scripts can change it as it plays: an engine revving. (Field: a number.)
While the game runs
Section titled “While the game runs”Not saved with the scene; scripts read them, and entity_get shows them as live while the game plays.
loudness: a number. How loud it is right now, from 0 (unheard) to its Volume; set by the game.
Scripts use it as SoundSource: its methods, events and values that aren’t saved with the scene.