Script:ambiance: Difference between revisions

From Arx Libertatis Wiki
Jump to navigation Jump to search
(Created page with "{{ScriptCommandPage |description=play or stop an ambiance |special= kill |flags= v Specify a volume for the ambiance n Play the ambiance only once instead of looping indefinitely |parameters= v?volume number* Volume to play the ambiance at in percent of the full volume ambiance path Path of the .amb file to play |intro=Ambiances are an Arx-specific format for background music tracks mixed in real time from individual samples. Zo...")
 
mNo edit summary
Line 11: Line 11:
|intro=Ambiances are an Arx-specific format for background music tracks mixed in real time from individual samples.
|intro=Ambiances are an Arx-specific format for background music tracks mixed in real time from individual samples.


[[Zone]]s 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.
[[Zone]]s 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 {{Command|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 {{Command|ambiance|kill}} invocation stops '''all''' ambiances, including those started by zones.
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 {{Command|ambiance|kill}} invocation stops '''all''' ambiances, including those started by zones.

Revision as of 11:43, 17 June 2022

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 those started by zones.

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

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