Skip to content

SFXSelection ​

Inherits: Resource

Inherited by: CastSFXSelection, CastingSFXSelection, EntityVoiceSFXSelection, EnvironmentalSFXSelection, ImpactSFXSelection, InteractableSFXSelection, LoopSFXSelection, MotionSFXSelection, ShootSFXSelection, SpawnSFXSelection, StatusEffectSFXSelection, UISFXSelection, VoicelineSFXSelection

Base class for SFX selection resources Works with static DatabaseAudio

Properties ​

Stringspecific_file""
floatvolume_db0.0
floatpitch_scale1.0
floatmax_distance20.0
floatunit_size10.0

Methods ​

AudioStreamget_sound_resource()
Stringget_sfx_selection_class_name( sfx_selection: SFXSelection ) static
Stringget_sfx_description( sfx: SFXSelection ) static

Property descriptions ​

String specific_file = "" ​

Optional specific file override (only used when selection_type is SPECIFIC)

float volume_db = 0.0 ​

Basic Properties - Ensure proper type initialization

float pitch_scale = 1.0 ​

The pitch of the sound (1 = normal).

3D Audio Settings

float max_distance = 20.0 ​

How far away the sound can be heard.

float unit_size = 10.0 ​

How loud the sound is close up (the distance where it starts to fade).

Method descriptions ​

AudioStream get_sound_resource() ​

This will be implemented by child classes

String get_sfx_selection_class_name( sfx_selection: SFXSelection ) ​

The class name of a sound selection (CastSFXSelection when it is empty).

String get_sfx_description( sfx: SFXSelection ) ​

A short text about a sound selection, for the editor.