Libraries.Interface.Controls.Scenes.Blueprints.Audio3DBlueprint Documentation
The Audio3DBlueprint is a blueprint for an object in a 3D space that emits a sound. This class has fields for the audio component and for a texture visible only in the editor. Audio3D objects aren't visible on their own when running a game but the blueprint holds a texture so that while editing a scene an object is visible where the sound would come from.
Inherits from: Libraries.Interface.Controls.Scenes.Blueprints.ItemBlueprint, Libraries.Language.Object
Actions Documentation
Compare(Libraries.Language.Object object)
This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.
Parameters
- Libraries.Language.Object: The object to compare to.
Return
integer: The Compare result, Smaller, Equal, or Larger.
Example
Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)
Equals(Libraries.Language.Object object)
This action determines if two objects are equal based on their hash code values.
Parameters
- Libraries.Language.Object: The to be compared.
Return
boolean: True if the hash codes are equal and false if they are not equal.
Example
use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)
GetDescription()
This action returns the text description of the blueprint.
Return
text: The description of this blueprint
GetDoppler()
This action returns if the audio will calculate doppler shift.
Return
boolean: True if the audio is calculating doppler shift, false otherwise
GetHashCode()
This action gets the hash code for an object.
Return
integer: The integer hash code of the object.
Example
Object o
integer hash = o:GetHashCode()
GetLooping()
This action returns if the audio will loop when the audio source ends
Return
boolean: True if the audio will loop, false otherwise
GetMaxVolumeDistance()
The GetMaximumVolumeDistance action returns how far away the listener may be from the Audio and still hear the Audio at full volume. When a new Audio object is created, its maximum volume distance is equal to the current default distance, which begins as 1.0 and can be set by calling SetDefaultMaximumVolumeDistance().
Return
number: The distance from this Audio where it may be heard at full volume.
GetModelTexture()
This action returns the texture to be used as on the model visible only in the editor
Return
Libraries.Game.Graphics.Texture: A texture for the model in the editor
GetName()
This action returns the name of the blueprint.
Return
text: The name of this blueprint
GetPaletteCrop()
This action returns how much to crop the palette image so it can be fitted into an icon properly.
Return
number: A number representing how much to crop the icon
GetPaletteIcon()
This action returns the texture to be used as an icon in a palette
Return
Libraries.Game.Graphics.TextureRegion: A texture for an icon for this model
GetPaletteScale()
This action returns the scale of the icon so the icon can be sized properly when in a palette.
Return
number: The scale to be used in a palette
GetPitch()
Returns the currently set pitch. The default pitch value is 1.0.
Return
number: The currently set pitch value.
GetPlayOnLoad()
This action returns if the Audio object will play the sound when the object loads.
Return
boolean: True if the audio will play on load, false otherwise
GetResponsiveness()
This action returns the responsiveness field of this blueprint.
Return
integer: The responsiveness field
GetRolloffRate()
The GetRolloffRate action returns the rate at which 3D positional audio becomes quieter when positioned far away from the listener. When an Audio object is created, its rolloff rate is equal to the default value provided by GetDefaultRolloffRate, which begins at 1.0 (but may be changed by the user). Lower rolloff rates cause the sound to fade more slowly over long distances, and higher rolloff rates cause sound to fade more quickly. The rolloff value is always positive.
Return
number: The current rolloff rate of this Audio.
GetSource()
This action returns the path to the source file of the audio the Audio3D object will use.
Return
text: Path to the audio file
GetVolume()
The GetVolume action returns the currently set volume. A number value of 1.0 represents 100% of normal volume.
Return
number: The volume value being used
IsPhysicsEnabled()
This action returns the physics enabled field of this blueprint.
Return
boolean: The physics enabled field
SetDescription(text description)
This action sets the text description of the blueprint.
Parameters
- text description: The new description of this blueprint
SetDoppler(boolean doppler)
This action sets if the audio will calculate doppler shift.
Parameters
- boolean doppler: If true the audio will calculate doppler shift
SetLooping(boolean looping)
This action sets if the audio will loop when the audio source ends
Parameters
- boolean looping: If true the audio will loop
SetMaxVolumeDistance(number maxVolumeDistance)
The SetMaximumVolumeDistance action will determine how far the sound can be from the listener before the volume is adjusted due to distance attenuation. If the audio listener is within the maximum volume distance of the audio, the audio will play at full volume. If the listener is farther away than this distance, then distance attenuation is applied relative to how much farther the listener is than this distance. When a new Audio object is created, its maximum volume distance is equal to the current default distance, which begins as 1.0 and can be set by calling SetDefaultMaximumVolumeDistance().
Parameters
- number maxVolumeDistance
SetModelTexture(Libraries.Game.Graphics.Texture modelTexture)
This action sets the texture to be used as on the model visible only in the editor
Parameters
- Libraries.Game.Graphics.Texture: A texture for the editor model
SetName(text name)
This action sets the name of the blueprint.
Parameters
- text name: The new name of this blueprint
SetPaletteCrop(number paletteCrop)
This action sets how much to crop the palette image so it can be fitted into an icon properly.
Parameters
- number paletteCrop: The amount to crop the palette icon
SetPaletteIcon(Libraries.Game.Graphics.TextureRegion paletteIcon)
This action sets the texture to be used as an icon in a palette
Parameters
- Libraries.Game.Graphics.TextureRegion: An icon texture for this model
SetPaletteScale(number paletteScale)
This action sets the scale of the icon so the icon can be sized properly when in a palette.
Parameters
- number paletteScale: The scale to be used in a palette
SetPhysicsEnabled(boolean enabled)
This action sets the physics enabled field of this blueprint.
Parameters
- boolean enabled: If true this blueprint has physics enabled by default for this item
SetPitch(number pitch)
The SetPitch action sets the pitch of the sound. By default, sounds have a pitch value of 1.0 (or 100% normal pitch). Lower values reduce the pitch, while higher values increase the pitch. Changing the pitch also causes the audio to play slower (with low pitch) or faster (with high pitch).
Parameters
- number pitch: The pitch value to use.
SetPlayOnLoad(boolean playOnLoad)
This action sets if the Audio object will play the sound when the object loads.
Parameters
- boolean playOnLoad: If true the audio will play on load
SetResponsiveness(integer responsive)
This action sets the responsiveness field of this blueprint.
Parameters
- integer responsive: An integer for how this item will respond to other physics objects
SetRolloffRate(number rolloffRate)
The SetRolloffRate action sets the rate at which 3D positional audio becomes quieter when positioned far away from the listener. When an Audio object is created, its rolloff rate is equal to the default value provided by GetDefaultRolloffRate, which begins at 1.0 (but may be changed by the user). Lower rolloff rates cause the sound to fade more slowly over long distances, and higher rolloff rates cause sound to fade more quickly. The rolloff value must always be positive.
Parameters
- number rolloffRate
SetSource(text source)
This action set the path to the source file of the audio the Audio3D object will use.
Parameters
- text source: Path to the audio file
SetVolume(number volume)
The SetVolume action adjusts the volume of a sound. It takes a number value to set the volume to a percentage of the original sound volume. A value of 1.0 will play the sound at 100% of standard volume. To reduce the sound by 25%, for example, you would provide the number 0.75, or 75% volume.
Parameters
- number volume: The volume value to use.
On this page
Variables TableAction Documentation- Compare(Libraries.Language.Object object)
- Equals(Libraries.Language.Object object)
- GetDescription()
- GetDoppler()
- GetHashCode()
- GetLooping()
- GetMaxVolumeDistance()
- GetModelTexture()
- GetName()
- GetPaletteCrop()
- GetPaletteIcon()
- GetPaletteScale()
- GetPitch()
- GetPlayOnLoad()
- GetResponsiveness()
- GetRolloffRate()
- GetSource()
- GetVolume()
- IsPhysicsEnabled()
- SetDescription(text description)
- SetDoppler(boolean doppler)
- SetLooping(boolean looping)
- SetMaxVolumeDistance(number maxVolumeDistance)
- SetModelTexture(Libraries.Game.Graphics.Texture modelTexture)
- SetName(text name)
- SetPaletteCrop(number paletteCrop)
- SetPaletteIcon(Libraries.Game.Graphics.TextureRegion paletteIcon)
- SetPaletteScale(number paletteScale)
- SetPhysicsEnabled(boolean enabled)
- SetPitch(number pitch)
- SetPlayOnLoad(boolean playOnLoad)
- SetResponsiveness(integer responsive)
- SetRolloffRate(number rolloffRate)
- SetSource(text source)
- SetVolume(number volume)