[DiscordArchive] btw is RegisterEvent the only way to have delay?
[DiscordArchive] btw is RegisterEvent the only way to have delay?
Archived author: Ergo • Posted: 2025-09-18T13:14:46.491000+00:00
Original source
btw is RegisterEvent the only way to have delay?
Archived author: Ergo • Posted: 2025-09-18T13:14:54.143000+00:00
Original source
I cant use something like sleep(1000)
Archived author: Foe • Posted: 2025-09-18T13:21:44.321000+00:00
Original source
No, sleeping the Lua thread would sleep the whole server. You either register a timed event on an object, or you use CreateLuaEvent
Archived author: Ergo • Posted: 2025-09-18T13:29:16.039000+00:00
Original source
Oh so eluna actually becomes part of the main thread that is the server
Archived author: Ergo • Posted: 2025-09-18T13:29:36.617000+00:00
Original source
I thought it was some side thing because sometimes it seems to fail or not hook properly to things
Archived author: Foe • Posted: 2025-09-18T13:31:06.758000+00:00
Original source
It doesn't run as a separate thread no, the hooks are just function calls that trigger Lua callback functions
Archived author: Foe • Posted: 2025-09-18T13:31:28.268000+00:00
Original source
So if you sleep in the Callback, you have to wait for it to exit before the core update loop continues
Archived author: Ergo • Posted: 2025-09-18T13:32:05.539000+00:00
Original source
Thats nice, I have a script that prevents resurrection if you dont have an item
Archived author: Ergo • Posted: 2025-09-18T13:32:25.865000+00:00
Original source
and was worried that if you spam the resurrection button you might be able to skip the check
Archived author: Ergo • Posted: 2025-09-18T13:32:39.502000+00:00
Original source
but now that I know that Im more confident it cant be skipped