diff options
author | Brandon <brandon@bremaweb.com> | 2016-07-10 00:08:26 -0500 |
---|---|---|
committer | paramat <mat.gregory@virginmedia.com> | 2017-05-03 03:12:45 +0100 |
commit | bd921a7916f0fafc493b1c4d0eeb5e2bb1d6a7c2 (patch) | |
tree | 55f92cc02fce2acc9bb041a34de3c474b894bd00 /doc/lua_api.txt | |
parent | f1d7a26b7c341b468f34325cec5c3d495f175a8f (diff) | |
download | minetest-bd921a7916f0fafc493b1c4d0eeb5e2bb1d6a7c2.tar.gz minetest-bd921a7916f0fafc493b1c4d0eeb5e2bb1d6a7c2.tar.bz2 minetest-bd921a7916f0fafc493b1c4d0eeb5e2bb1d6a7c2.zip |
Sound API: Add fading sounds
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r-- | doc/lua_api.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 479e38a2e..77ffb88e2 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -456,11 +456,13 @@ Examples of sound parameter tables: -- Play locationless on all clients { gain = 1.0, -- default + fade = 0.0, -- default, change to a value > 0 to fade the sound in } -- Play locationless to one player { to_player = name, gain = 1.0, -- default + fade = 0.0, -- default, change to a value > 0 to fade the sound in } -- Play locationless to one player, looped { @@ -2587,6 +2589,11 @@ These functions return the leftover itemstack. * `spec` is a `SimpleSoundSpec` * `parameters` is a sound parameter table * `minetest.sound_stop(handle)` +* `minetest.sound_fade(handle, step, gain)` + * `handle` is a handle returned by minetest.sound_play + * `step` determines how fast a sound will fade. + Negative step will lower the sound volume, positive step will increase the sound volume + * `gain` the target gain for the fade. ### Timing * `minetest.after(time, func, ...)` |