From Arx Libertatis Wiki
Jump to navigation Jump to search

The play script command is used to play a sound effect file for an entity.


play [-ilpo] <sfx*>
play -s

Context: Any Entity


 -i: Stop the previous sound t hat was played with the -i flag for this entity before playing this one
 -l: Loop indefinitely instead of only playing the sound once
 -p: Randomize pitch/speed between 0.9× and 1.1× instead of playing at 1× speed
 -o: Play sound in front of the player instead of at the entity's position
 -s: Stop the previous sound that was played with the -i flag for this entity


sfx path or variable Path of .wav file to play, relative to sfx and may omit the .wav extension

Context is ignored if the -o flag is given.

The -o flag is implicitly enabled when called from the inventoryuse event

Audio playback command comparison

play playspeech speak cine
Text shown with cinemascope on unless -t is used
Localized text entry required unless -t is used
Character is animated
Player camera is controlled with -c
Sample loaded relative to sfx speech/<language> speech/<language> sfx or speech/<language>
Randomized sample with -t if there are multiple
Playback speed (pitch) 1× or random in [0.9,1.1]× NPC pitch unless invisible or in inventory NPC pitch unless -o is used
Playback relative to entity (player if in player inventory) entity (player if invisible or in inventory) entity (player with -p/-o) camera
Playback position updates when moving ( if in player inventory) ( if invisible or in inventory)
Command executed on completion cine_end event