SoundPlayer
SoundPlayers, when actviated, emit a sound effect inferred from it’s attributes or children. The SoundPlayer will play the first thing found in order:
- A
PlayFromAssetskey - A
Soundattribute - A
Soundinstance named “Sound”
SoundPlayer = { -- Attributes PlayFromAssets: std.Attribute<keyof<typeof(std.audio.AUDIO_ASSETS)>?>, Sound: std.Attribute<string?>, Spatial: std.Attribute<boolean>, Speed: std.Attribute<number?>, Volume: std.Attribute<number?>, Activatable: std.Attribute<boolean>, ActivationBehavior: std.Attribute<ActivationBehavior>,}Attributes
Section titled “Attributes”PlayFromAssets
Section titled “PlayFromAssets”SoundPlayer.PlayFromAssets: std.Attribute<keyof<typeof(std.audio.AUDIO_ASSETS)>?>Plays a sound directly from Welcome To Hell’s audio assets. If specified, this attribute overrides any Sound attribute or Sound instance parented under the SoundPlayer.
SoundPlayer.Sound: std.Attribute<string?>An asset ID that should be used if a PlayFromAssets attribute or a
Sound instance isn’t present.
Spatial
Section titled “Spatial”SoundPlayer.Spatial: std.Attribute<boolean>Toggles if the sound should be parented to the part, so played “spatially”, or parented to nil, so played “globally”.
SoundPlayer.Speed: std.Attribute<number?>Divides the sound’s duration, ie. value of 1 means normal speed, value
of 2 means double speed, value of 0.5 means half speed. If specified, this
overrides the PlaybackSpeed property in any Sound instance.
Volume
Section titled “Volume”SoundPlayer.Volume: std.Attribute<number?>How loud should the sound be. If specified, this overrides the Volume
property in any Sound instance.
Activatable
Section titled “Activatable”SoundPlayer.Activatable: std.Attribute<boolean>Whether this object can be activated. See the Activation page.
ActivationBehavior
Section titled “ActivationBehavior”SoundPlayer.ActivationBehavior: std.Attribute<ActivationBehavior>How should this object be activated. See the Activation page.