SetAmbientTrackAction ​
Inherits: EventAction < Resource
Action to control ambient track playback Uses TrackSelectionDialog to pick specific tracks NOTE: The world loads the tracks of its events, zones, weather and encounters when it starts (AudioPreload), so they play without a pause. Other tracks load when they are needed.
Properties ​
AmbientAction | action | AmbientAction.PLAY_TRACK |
SoundSource | source | |
float | fade_duration | 3.0 |
bool | use_crossfade | true |
bool | return_to_map_album | false |
Methods ​
String | get_function_description() |
SoundSource | get_source() |
Dictionary | save() |
void | load_data( data: Dictionary ) |
Enumerations ​
enum AmbientAction ​
The options of ambient action: play track, stop, fade stop.
- PLAY_TRACK =
0- Play a specific ambient track - STOP =
1- Stop ambient immediately - FADE_STOP =
2- Fade out and stop ambient - CLEAR =
3- Take the track of an event off: the ambience of the zone, the weather, the shelter or the world comes back
Property descriptions ​
AmbientAction action = AmbientAction.PLAY_TRACK ​
What to do with the ambient sound
SoundSource source ​
What to play (only for PLAY_TRACK): a track with its options (loop or one shot, the pause between plays, volume, fade). It wins over the zone, the weather and the shelter until it ends or a Clear action takes it off
float fade_duration = 3.0 ​
Crossfade duration in seconds (for PLAY_TRACK and the fades of the other actions; the source may have its own fade)
bool use_crossfade = true ​
Whether to use crossfade when playing (only used for PLAY_TRACK action)
bool return_to_map_album = false ​
After track finishes, return to map album instead of looping
Method descriptions ​
String get_function_description() ​
Return a description of this action with parameter placeholders
SoundSource get_source() ​
The source this action plays: the one chosen, else a track made from the old settings of the action
Dictionary save() ​
Save action state to a dictionary
void load_data( data: Dictionary ) ​
Load action state from a dictionary