πŸ’¬

Community answer

Collected from the ACE community Discord archive around 2024-12-23. It may be informal or outdated β€” anyone can edit this page to improve it. This topic changes between game versions β€” double-check before relying on it. Original discussion

Stopping all files from a dodir directory when switching

πŸŒ™ LuaUpdated 2 days agoβ€’0 views
dodir keeps old files running - cleanest is a deinit function: wrap hook.add/timer.create/timer.simple/net.receive once (saving unwrapped refs for always-on stu…

How to fully disable files from one directory when switching dodir targets

dodir keeps old files running - cleanest is a deinit function: wrap hook.add/timer.create/timer.simple/net.receive once (saving unwrapped refs for always-on stuff), then _deinit() removes all hooks/timers/net receivers before dodir()-ing the other directory. Alternative: have each script return a cleanup function since dodir collects script return values.

Was this article helpful?

See More

Discussion(0)

No comments yet. Be the first to ask a question!

Have a question? Sign in to join the discussion.