Go to file
CosmosScripter deb4f789cd
First version is out!
So, I had this random idea and decided to upload it.
2021-07-23 20:30:52 -03:00
LICENSE.txt First version is out! 2021-07-23 20:30:52 -03:00
README.md First version is out! 2021-07-23 20:30:52 -03:00
depends.txt First version is out! 2021-07-23 20:30:52 -03:00
description.txt First version is out! 2021-07-23 20:30:52 -03:00
init.lua First version is out! 2021-07-23 20:30:52 -03:00

README.md

Sound distance mod [v1.0] by Cosmos

This mod only adds a function, which plays a sound with a different gain depending on the distance to the sound origin. It can be used so players can know if they're either closer or further to the sound origin.

How to use:

sound_distance_play(pos, sound, sound_gain, distance)

Example:

sound_distance_play(self.object:get_pos(), "example_sound", 1, 16)

See: license.txt for license.

Special thanks to TenPlus1, as the "get_distance" function is from mobs redo.

Depends on: default.

==HOW TO INSTALL THE MOD== 1.Download the mod, it may be a ZIP file. 2. Extract the folder inside to somewhere on the computer (if its a ZIP file). 3.Make sure that when you open the folder, you can directly find "README.md" in the listing. If you just see another folder, move that folder up one level and delete the old one. 4.Rename the folder to "sound_distance" incase it has another name. 5.Move the mod to "minetest/mods/" or "~/.minetest/mods/". 6.Here we go!