Skip to content

BlendAudioScene

Narta Xaymar Dirks edited this page Nov 27, 2026 · 1 revision

BlendAudioScene BlitzLLVM

BlendAudioScene:Void scene_a:Int32, scene_b:Int32, weight:Float32, fade_ms:Int32=0
Parameter Mode Type Default Description
scene_a In Int32 required The scene at weight 0.
scene_b In Int32 required The scene at weight 1.
weight In Float32 required 0 is all of scene_a, 1 all of scene_b. Values outside are limited to that range.
fade_ms In Int32 0 How many milliseconds it takes to get to the mix, 0 (the default) at once. About a frame keeps a crossfade smooth.

Description

BlitzLLVM This command does not exist in the original Blitz products. BlitzLLVM adds it.

Sets a mix of two scenes: every value that either holds, between the one of the first scene and the one of the second. Called every frame with a weight that follows the player, it crossfades from one place into another. This is a BlitzLLVM extension.

Differences

  • A value that only one scene holds is mixed with its default: 1 for a bus volume, what CreateListener was given for rolloff, doppler and distance (1 without a listener), 340 for the speed of sound and 0 for the radius.

Examples

; Walking into the cave: all outside at 20 units from the mouth, all cave at the mouth.
weight# = 1 - EntityDistance(camera, cave_mouth) / 20
BlendAudioScene outside, inside, weight, 20

Related Commands

ApplyAudioScene BlitzLLVM, AudioSceneListener BlitzLLVM, AudioSceneVolume BlitzLLVM, CaptureAudioScene BlitzLLVM, ClearAudioScene BlitzLLVM, CopyAudioScene BlitzLLVM, CreateAudioScene BlitzLLVM, FreeAudioScene BlitzLLVM

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally