updated documentation

master
NetherEran 2019-11-02 12:51:24 +01:00
parent a7dbe6c0cb
commit 6c3549cc49
1 changed files with 8 additions and 13 deletions

View File

@ -208,33 +208,27 @@ minetest.register_entity("mod:name",{
...
}
sounds = {
[name] = [string filename], --single, simple,
[name] = [string filename], --single, simple,
[name] = { --single, more powerful. All fields but 'name' are optional
[name] = { --single, more powerful. All fields but 'name' are optional
name = [string filename],
gain=[num or range], --range is a table of the format {x=left_bound,y=right_bound}
gain=[num or range], --range is a table of the format {left_bound, right_bound}
fade=[num or range],
pitch=[num or range],
max_distance=[num or range],
loop = [bool]
},
[name] = {
{ --variant, sound is chosen randomly
[name] = { --variant, sound is chosen randomly
{
name = [string filename],
gain=[num or range], --range is at table of the format {x=left_bound,y=right_bound}
gain=[num or range],
fade=[num or range],
pitch=[num or range],
max_distance=[num or range],
loop = [bool]
},
{
name = [string filename],
gain=[num or range],
fade=[num or range],
pitch=[num or range],
max_distance=[num or range],
loop = [bool]
},
...
},
@ -360,7 +354,8 @@ function mobkit.animate(self,anim)
function mobkit.make_sound(self,sound)
-- sound is string, see entity definition
-- makes an entity play sound, or does nothing if not defined
-- makes an entity play sound, or does nothing if not defined
--returns sound handle
function mobkit.go_forward_horizontal(self,speed)
-- sets an entity's horizontal velocity in yaw direction. Vertical velocity unaffected.