summaryrefslogtreecommitdiff
path: root/doc/lua_api.txt
diff options
context:
space:
mode:
authorparamat <mat.gregory@virginmedia.com>2016-12-01 04:49:17 +0000
committerparamat <mat.gregory@virginmedia.com>2016-12-01 05:09:01 +0000
commit105676b952484affdb97164eceaf4cb903955373 (patch)
treeec55e9bf7450d6dd69bf17e61d8c6163e2ccb09e /doc/lua_api.txt
parent6c9f10e132ac80a0caffef12d61de84a0a6b02b3 (diff)
downloadminetest-105676b952484affdb97164eceaf4cb903955373.tar.gz
minetest-105676b952484affdb97164eceaf4cb903955373.tar.bz2
minetest-105676b952484affdb97164eceaf4cb903955373.zip
Lua_api.txt: Clarify use of looping sounds
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r--doc/lua_api.txt21
1 files changed, 15 insertions, 6 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index eb47270f4..092704c04 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -441,18 +441,24 @@ from the available ones of the following files:
Examples of sound parameter tables:
- -- Play location-less on all clients
+ -- Play locationless on all clients
{
gain = 1.0, -- default
}
- -- Play location-less to a player
+ -- Play locationless to one player
{
to_player = name,
gain = 1.0, -- default
}
+ -- Play locationless to one player, looped
+ {
+ to_player = name,
+ gain = 1.0, -- default
+ loop = true,
+ }
-- Play in a location
{
- pos = {x=1,y=2,z=3},
+ pos = {x = 1, y = 2, z = 3},
gain = 1.0, -- default
max_hear_distance = 32, -- default, uses an euclidean metric
}
@@ -461,15 +467,18 @@ Examples of sound parameter tables:
object = <an ObjectRef>,
gain = 1.0, -- default
max_hear_distance = 32, -- default, uses an euclidean metric
- loop = true, -- only sounds connected to objects can be looped
+ loop = true,
}
+Looped sounds must either be connected to an object or played locationless to
+one player using `to_player = name,`
+
### `SimpleSoundSpec`
* e.g. `""`
* e.g. `"default_place_node"`
* e.g. `{}`
-* e.g. `{name="default_place_node"}`
-* e.g. `{name="default_place_node", gain=1.0}`
+* e.g. `{name = "default_place_node"}`
+* e.g. `{name = "default_place_node", gain = 1.0}`
Registered definitions of stuff
-------------------------------