DeactivateMix

method
DeactivateMix<public>(): void

Deactivates the mix set on the audio mixer.

Module
/Fortnite.com/Devices
Declared in
audio_mixer_device
Source
fortnite

Used in

# This is the Audio Mixer device.
    # Drag your Audio Mixer device into this slot in the editor.
    @editable
    AudioMixer : audio_mixer_device = audio_mixer_device{}
    # note: audio_mixer_device manages sound buses via control bus mixes.
    # Use ActivateMix/DeactivateMix to switch between mix presets configured
    # in the editor. Volume changes must be wired via the Audio Mixer device's
    # mix settings in the editor (e.g., set the mix to reduce music bus volume).

    # This runs once when the game starts.
    OnBegin<override>()<suspends> : void =
        # Connect the trigger to our function.
        # When someone enters, run 'OnPlayerEnter'.
        TriggerVolume.TriggeredEvent.Subscribe(OnPlayerEnter)

    # This function runs when a player enters the trigger.
    # trigger_device events pass an optional agent, so we accept ?agent.
    OnPlayerEnter(Agent : ?agent) : void =
        # Activate the mix configured on the Audio Mixer device.
        # Set up your mix in the editor to lower the Music bus volume to ~20%.
        AudioMixer.ActivateMix()
        # note: To control a separate Effects bus, add a second
        # @editable audio_mixer_device for your effects mix and
        # call ActivateMix on that reference instead.
AudioSystem / Audio Zone Module verse-source
case (Time):
                time_of_day_enum.Day =>
                    OutdoorMixNight.DeactivateMix()
                    OutdoorMixDay.ActivateMix()
                    set OutdoorMix = OutdoorMixDay
                time_of_day_enum.Night =>
                    OutdoorMixDay.DeactivateMix()
                    OutdoorMixNight.ActivateMix()
                    set OutdoorMix = OutdoorMixNight
Modules / Audio Zone Module verse-source
case (Time):
                time_of_day_enum.Day =>
                    OutdoorMixNight.DeactivateMix()
                    OutdoorMixDay.ActivateMix()
                    set OutdoorMix = OutdoorMixDay
                time_of_day_enum.Night =>
                    OutdoorMixDay.DeactivateMix()
                    OutdoorMixNight.ActivateMix()
                    set OutdoorMix = OutdoorMixNight
DatalayerSystem / Datalayers Module verse-source
if (AudioMixerDevice := audio_mixer_device[TaggedActor]):
                if (DebugMode?) then Logger.Print("{DataLayerName} - Audio Mixer Device Found, Deactivating")
                AudioMixerDevice.DeactivateMix()
            else if (AudioPlayerDevice := audio_player_device[TaggedActor]):
                if (DebugMode?) then Logger.Print("{DataLayerName} - Audio Devices Found, Stopping")
                AudioPlayerDevice.Stop()
                AudioPlayerDevice.Disable() 
            else if (BarrierDevice := barrier_device[TaggedActor]):
                if (DebugMode?) then Logger.Print("{DataLayerName} - Barrier Devices Found, Enabling")