Ranges for playSound variables
This commit is contained in:
@@ -14,8 +14,8 @@ Device name: `sound`
|
||||
### Methods
|
||||
`playSound(name:string[,volume,pitch])` plays back the sound effect with the specified name.
|
||||
- `name` is the name of the effect to play.
|
||||
- `volume` is the volume at which to play the effect, with `1` being the normal volume. Optional, defaulting to `1`.
|
||||
- `pitch` is the volume at which to play the effect, with `1` being the normal pitch. Optional, defaulting to `1`.
|
||||
- `volume` is the volume at which to play the effect in the range from `0` to `1`, with `1` being the normal volume. Optional, defaulting to `1`.
|
||||
- `pitch` is the pitch at which to play the effect in the range from `0.5` to `2`, with `1` being the normal pitch. Optional, defaulting to `1`.
|
||||
- Throws if the specified name is invalid.
|
||||
|
||||
`findSound(name:string):table` returns a list of available sound effects matching the given name. Note that the number of results is limited, so overly generic queries will result in truncated results.
|
||||
|
||||
@@ -12,8 +12,10 @@
|
||||
Название устройства: `sound`
|
||||
|
||||
### Методы
|
||||
`playSound(name:string)` проигрывает звуковой эффект с указанным именем.
|
||||
`playSound(name:string[,volume,pitch])` проигрывает звуковой эффект с указанным именем.
|
||||
- `name` - название эффекта для проигрывания.
|
||||
- `volume` - громкость проигрывания эффекта в диапазоне от `0` до `1`, где `1` - нормальная громкость. Опционально, по умолчанию `1`.
|
||||
- `pitch` - высота звука для проигрываемого эффекта в диапазоне от `0.5` до `2`, где `1` - нормальная высота. Опционально, по умолчанию `1`.
|
||||
- Создает ошибку, если такого эффекта не существует.
|
||||
|
||||
`findSound(name:string):table` возвращает список доступных звуковых эффектов с таким именем. Учитывайте, что количество выдаваемых результатов ограничено, поэтому запросы с большим количеством результатов будут обрезаться.
|
||||
|
||||
Reference in New Issue
Block a user