how can i make an db meter ui like in hellmet?
Do you mean where audio levels are captured from the game environment, converted to dB, and displayed in a UI?
Yes like the one in Hellmet if you ever played it.
Maybe an AudioAnalyzer can help you out.
First of all you have to design a UI element to represent the dB levels. This could be a progress bar, a series of bars, or any other graphical representation you prefer.
(If you already have an UI send an image to take a look)
Thank you very much but i figured it out myself!
Make a Local Script where it will continuously update the UI element to reflect changes in the dB levels captured from the game environment.
Depending on how your elements are being strucutred in StarterGui i can provide you an example:
local progressBar = script.Parent -- if LocalScript in U
local function AudioToDB(audioLevel) -- This converts audio level to dB
return 20 * math.log10(audioLevel)
end
local function UpdateDBMeter(dBLevel) -- Function to update UI with dB levels
progressBar.Value = dBLevel
end
while true do -- Update loop
local audioLevel = game.Workspace.SoundName.PlaybackLoudness (Your sound location using its PlayBackLoudness)
local dBLevel = AudioToDB(audioLevel) -- Converted dB
UpdateDBMeter(dBLevel)
-- Wait for next update
wait(0.1) -- here you can adjust update frequency as you need
end
I would recommend you for futures support send images of your explorer game so everybody can accurately provide you help
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.