Hello, devs! I had made a module script where it helps you to build your very own advanced dialogue system (like in those visual novels), It is almost done except for one feature, skipping. I still have no idea how I make the skipping as I still don’t know how to cancel a function that isn’t in that function. For ex:
local DialogueModule = {}
function DialogueModule.Typewriter(sT) -- (sT is a string word table)
for i, v in pairs(sT) do
for sIndex = 1, string.len(i), 1 do
-- type writer effect etc etc
wait(0.1)
end
end
function DialogueModule.CancelEverything()
-- some function cancelation thing
end
return DialogueModule
In that function, I want to cancel the function, but from another function (aka we cant use return as it only works for the function it is nested upon)