"Hmm, what we have Animation Events but no Sound Events? "
~ ItzMrRatsP
Alright, But really, why we don’t have something like “Sound Events”? Well… It doesn’t matter anymore!
Because I’ve made something that could replace this cool feature for now
Introducing Audio Events !!
An alternative for the Sound Events, Which we don’t have on roblox, yet…
How To Use
First, And most importantly… Import the module
Alright now put the module in ReplicatedStorage
Now, listen carefully, or watch carefully… Now create LocalScript or Script and then you simply require the Module you just imported.
Here is an example of how to use this module
local Sound : Sound = path.to.Sound
local TimeEvents: {[string]: {Time: number, Value: string}} = {
["Test"] = {Time = 5, Value = "Test"},
["Play"] = {Time = 10, Value = "Play"},
["Argue"] = {Time = 15, Value = "Test"}
}
local AudioEvents = require(path.to.Module).new(Sound, TimeEvents)
AudioEvents:GetMarkerReachedSignal("Argue"):Connect(function(Value: any)
print(Value)
end)
Roadmap
Early 2025
Create Plugin for the Module so Its easier to use and Its more of automated process than manual process.
Improve on the Module, Also find better way to do Events instead of having table of Time Events.
Forgot to add this in, But you can use Destroy to destroy the events, Meaning after using Destroy nothing will be called, Because all of the events will be cancelled and all the connections will be disconnected.
Update 1.1 will come with plugin, So you won’t have hard time timing stuff
Aren’t the sounds supposed to be linked to other things, such as animations, as opposed to the other way around? Is there a specific use case you had to make this?
Would it be possible to store an event to a sound?
For example instead of finding a specific sound instance then setting the events to that specific instance, I can instead have code that runs when X event is reached but that X event is at different points for different sounds.
So if Sound1 has X event at 5 seconds, but Sound2 has X event at 10 seconds, I don’t need to
["Event"] = {Time = 5, Value = "X"}
Rather I can just
["Event"] = {Time = Sound.Time, Value = Sound.Value} --With Sound being a variable