Difference between revisions of "Documentation/Engine/Units/sound data"

From SCS Modding Wiki
Jump to navigation Jump to search
(First draft.)
 
(Attributes)
 
(2 intermediate revisions by 2 users not shown)
Line 15: Line 15:
 
|looped
 
|looped
 
|bool
 
|bool
|
+
|false
 
|When true, the sound clip will be looped while active. When false, it will play once when triggered.
 
|When true, the sound clip will be looped while active. When false, it will play once when triggered.
 
|-
 
|-
 
|is_2d
 
|is_2d
 
|bool
 
|bool
|
+
|false
|True indicates a mono sound source. False indicates stereo.
+
|When true, the sound ignores any spatial features (position, orientation, distance, movement).
 
<!-- Hide until we have a description
 
<!-- Hide until we have a description
 
|-
 
|-
Line 32: Line 32:
 
|volume
 
|volume
 
|float
 
|float
|
+
|1.0
 
|Playback volume relative to recorded level (0.0 is full attenuation, 1.0 is straight through, 2.0 is twice as loud)
 
|Playback volume relative to recorded level (0.0 is full attenuation, 1.0 is straight through, 2.0 is twice as loud)
 
|}
 
|}

Latest revision as of 10:48, 25 July 2019

The sound_data unit class is used to define sounds.

Attributes

Name Type Default Value Description
name string Path to the sound clip (e.g. name: "/sound/environment/timmys_ducks.ogg")
looped bool false When true, the sound clip will be looped while active. When false, it will play once when triggered.
is_2d bool false When true, the sound ignores any spatial features (position, orientation, distance, movement).
volume float 1.0 Playback volume relative to recorded level (0.0 is full attenuation, 1.0 is straight through, 2.0 is twice as loud)