SoundAt

Kategorie: Effekte
Ab Engineversion: 4.0 OC

Beschreibung

Plays a sound at the specified position. The specified sound file has to be available in the group Sound.ocg, in the active scenario file, or in any loaded object definition.

Syntax

bool SoundAt(string name, int x, int y, int volume, int player, int custom_falloff_distance, int pitch, proplist modifier);

Parameter

name:
Name des Soundeffekts (ohne .wav/.ogg-Erweiterung). Wildcards dürfen wie in WildcardMatch verwendet werden
x:
X-Position of the sound effect. An offset if called from object-context.
y:
Y-Position of the sound effect. An offset if called from object-context.
volume:
[opt] 0-100: Lautstärke, in der der Sound abgespielt wird. Bei nil wird 100 als Standard angenommen.
player:
[opt] Spielernummer des Spielers, für den der Sound abgespielt werden soll. Im Netzwerkspiel wird der Sound dann nicht bei einem Spieler abgespielt, der an einem anderen Rechner spielt. Wenn nil oder nicht angegeben, wird der Sound für alle Spieler abgespielt.
custom_falloff_distance:
[opt] The further away the sound effect from the player, the more quiet it is played. By default, the sound will not be hearable anymore in a distance of 700 pixels. A custom distance can be specified here.
pitch:
[opt] Pitch modification between -90 and 1000. Values larger than zero let the sound play the faster and at a higher pitch. The resulting speed multiplication factor is (pitch + 100) / 100.
modifier:
[opt] Sound modifier for special effects such as reverb or echo. See Sound modifiers.
Siehe auch: Sound
Siehe auch: Music
Siehe auch: Sound modifiers
Sven2, 2002-08