Script:ambiance

From Arx Libertatis Wiki
Jump to navigation Jump to search

The ambiance script command is used to play or stop an ambiance. Ambiances are an Arx-specific format for background music tracks mixed in real time from individual samples.

Zones can have an associated ambiance, which is automatically played when entering the zone. Exiting the zone does not stop the ambiance but entering a different zone with an ambiance fades out the old zone ambiance and fades in the ambiance of the new zone to replace it. The active zone ambiance can be changed using the zoneparam ambiance command.

Ambiances can also be played manually with this command which does not stop any existing zone or script ambiances, allowing multiple ambiances to be played simultaneously. The ambiance kill invocation stops all ambiances, including the active zone ambiance.

Usage

ambiance [-vn] [v?volume*] <ambiance>
ambiance kill

Context: Ignored

Flags:

 -v: Specify a volume for the ambiance
 -n: Play the ambiance only once instead of looping indefinitely

Parameters:

ParameterTypeDescription
volume (requires -v) number or variable Volume to play the ambiance at in percent of the full volume
ambiance path Path of the .amb file to play, relative to sfx/ambiance and may omit the .amb extension

In versions before Arx Libertatis 1.3, the -v and -n flags cannot be combined.