Mention that script.raise_event raises it instantly
Posted: Thu Dec 05, 2024 7:29 pm
I personally think it's fairly obvious that it would raise it instantly, but it doesn't hurt to be explicit about it.
So my little snippet of code doing this works fine
So my little snippet of code doing this works fine
Code: Select all
local flag = false
function some_func()
flag = true
script.raise_event("my-event", {})
flag = false
end
function other_func()
if not flag then error("This can only be called during my-event") end
-- stuff
end