Since engine version: 4.0 OC
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.
bool SoundAt(string name, int x, int y, int volume, int player, int custom_falloff_distance, int pitch, proplist modifier);
- Name of the sound effect (without .wav/.ogg extension). Wildcards as used by WildcardMatch are used.
- X-Position of the sound effect. An offset if called from object-context.
- Y-Position of the sound effect. An offset if called from object-context.
- [opt] 0-100: volume for playback of the sound. A volume value of
nilmeans playback at 100.
- [opt] Player number of the player for which the sound is to be played. In network games, the sound will thus not be audible for the other players. If
nil(or not specified), the sound will be played for all players.
- [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.
- [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.
- [opt] Sound modifier for special effects such as reverb or echo. See Sound modifiers.
See also: Sound
See also: Music
See also: Sound modifiers