Automated: create new component page |
This is no longer a stub. Added field descriptions. Style. Created another table for the individual sound clips |
||
(One intermediate revision by one other user not shown) | |||
Line 3: | Line 3: | ||
|Name=Button Audio Clip Player | |Name=Button Audio Clip Player | ||
}} | }} | ||
The '''ButtonAudioClipPlayer''' plays an [[Type:AudioClip|AudioClip]] from a list on press, release, and hover. | |||
{{Table ComponentFields | {{Table ComponentFields | ||
|ParentUnder|Slot| | |ParentUnder|Slot| Parents the one shot sound under the specified [[Slot|slot]]. | ||
|MinDistance|'''[[Type:Nullable`1|Nullable`1]]<[[Type:Float|Float]]>'''|TypeAdv1=true| | |MinDistance|'''[[Type:Nullable`1|Nullable`1]]<[[Type:Float|Float]]>'''|TypeAdv1=true| The minimum distance for this sound. | ||
|MaxDistance|'''[[Type:Nullable`1|Nullable`1]]<[[Type:Float|Float]]>'''|TypeAdv2=true| | |MaxDistance|'''[[Type:Nullable`1|Nullable`1]]<[[Type:Float|Float]]>'''|TypeAdv2=true| The maximum distance for this sound. | ||
|RolloffMode|'''[[Type:Nullable`1|Nullable`1]]<[[Type:AudioRolloffMode|AudioRolloffMode]]>'''|TypeAdv3=true| | |RolloffMode|'''[[Type:Nullable`1|Nullable`1]]<[[Type:AudioRolloffMode|AudioRolloffMode]]>'''|TypeAdv3=true| The rolloff for this sound. | ||
|PressedClips|{{RootFieldType|SyncList`1|[[Type:ClipData|ClipData]]}}|TypeAdv4=true| | |PressedClips|{{RootFieldType|SyncList`1|[[Type:ClipData|ClipData]]}}|TypeAdv4=true| The list of pressed clip sounds. | ||
|ReleasedClips|{{RootFieldType|SyncList`1|[[Type:ClipData|ClipData]]}}|TypeAdv5=true| | |ReleasedClips|{{RootFieldType|SyncList`1|[[Type:ClipData|ClipData]]}}|TypeAdv5=true| The list of released clip sounds. | ||
|HoverEnterClips|{{RootFieldType|SyncList`1|[[Type:ClipData|ClipData]]}}|TypeAdv6=true| | |HoverEnterClips|{{RootFieldType|SyncList`1|[[Type:ClipData|ClipData]]}}|TypeAdv6=true| The list of hover enter clip sounds. | ||
|HoverLeaveClips|{{RootFieldType|SyncList`1|[[Type:ClipData|ClipData]]}}|TypeAdv7=true| | |HoverLeaveClips|{{RootFieldType|SyncList`1|[[Type:ClipData|ClipData]]}}|TypeAdv7=true| The list of hover leave clip sounds. | ||
}} | }} | ||
== | {{Table TypeFields | ||
|Clip|'''[[Type:AudioClip|AudioClip]]'''|TypeAdv1=true|The sound to play. | |||
|Weight|'''[[Type:float|float]]'''|TypeAdv2=true|How likely this sound will play. | |||
|MinVolume|'''[[Type:float|float]]'''|TypeAdv3=true|The minimum volume this sound will play at randomly. | |||
|MaxVolume|'''[[Type:float|float]]'''|TypeAdv4=true|The maximum volume this sound will play at randomly. | |||
|MinSpeed|'''[[Type:float|float]]'''|TypeAdv5=true|The minimum speed this sound will play at randomly. | |||
|MaxSpeed|'''[[Type:float|float]]'''|TypeAdv6=true|The maximum speed this sound will play at randomly. | |||
|Spatialized|'''[[Type:bool|bool]]'''|TypeAdv7=true|Should this sound be a 3D sound? | |||
|SpatialBlend|'''[[Type:float|float]]'''|TypeAdv8=true|How 3D should this sound be? | |||
|MinDistance|'''[[Type:Nullable`1|Nullable`1]]<[[Type:float|float]]>'''|TypeAdv9=true|The minimum distance this sound should play at. | |||
|MaxDistance|'''[[Type:Nullable`1|Nullable`1]]<[[Type:float|float]]>'''|TypeAdv10=true|The maximum distance this sound should play at. | |||
|RolloffMode|'''[[Type:Nullable`1|Nullable`1]]<[[Type:AudioRolloffMode|AudioRolloffMode]]>'''| The rolloff for this clip. | |||
}} | |||
== Usage == | |||
This is a powerful component that allows for customizability for your many sounds in one slot, great for boopers and [[UIX]] buttons that need to have a variety of sounds. | |||
== Examples == | == Examples == | ||
Line 25: | Line 40: | ||
[[Category:Components:Common UI:Button Interactions:Media{{#translation:}}|Button Audio Clip Player]] | [[Category:Components:Common UI:Button Interactions:Media{{#translation:}}|Button Audio Clip Player]] | ||
[[Category:Components{{#translation:}}|Button Audio Clip Player]] | [[Category:Components{{#translation:}}|Button Audio Clip Player]] | ||
Latest revision as of 01:31, 12 September 2024
Component image
The ButtonAudioClipPlayer plays an AudioClip from a list on press, release, and hover.
Name | Type | Description |
---|---|---|
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated. |
Enabled
|
Bool | Controls whether or not this component is enabled. |
ParentUnder
|
Slot | Parents the one shot sound under the specified slot. |
MinDistance
|
Nullable`1<Float> | The minimum distance for this sound. |
MaxDistance
|
Nullable`1<Float> | The maximum distance for this sound. |
RolloffMode
|
Nullable`1<AudioRolloffMode> | The rolloff for this sound. |
PressedClips
|
list of ClipData | The list of pressed clip sounds. |
ReleasedClips
|
list of ClipData | The list of released clip sounds. |
HoverEnterClips
|
list of ClipData | The list of hover enter clip sounds. |
HoverLeaveClips
|
list of ClipData | The list of hover leave clip sounds. |
Name | Type | Description |
---|---|---|
Clip
|
[[Type:AudioClip|AudioClip]] | The sound to play. |
Weight
|
float | How likely this sound will play. |
MinVolume
|
float | The minimum volume this sound will play at randomly. |
MaxVolume
|
float | The maximum volume this sound will play at randomly. |
MinSpeed
|
float | The minimum speed this sound will play at randomly. |
MaxSpeed
|
float | The maximum speed this sound will play at randomly. |
Spatialized
|
bool | Should this sound be a 3D sound? |
SpatialBlend
|
float | How 3D should this sound be? |
MinDistance
|
Nullable`1<float> | The minimum distance this sound should play at. |
MaxDistance
|
Nullable`1<float> | The maximum distance this sound should play at. |
RolloffMode
|
Nullable`1<AudioRolloffMode> | The rolloff for this clip. |
Usage
This is a powerful component that allows for customizability for your many sounds in one slot, great for boopers and UIX buttons that need to have a variety of sounds.