on_nth_tick question
Posted: Sat Feb 08, 2020 7:58 pm
I have been experimenting with on_nth_tick, and had a question. When I do a simple experiment in my control.lua to add an on_nth_tick handler it works. When I have another event handler call on_nth_tick(#,nil) to remove that handler, the tick handler is disabled as expected.
The issue is that the on_nth_tick hook I'd like to unregister comes from a different mod. When I call on_nth_tick with the tick number used by that mod, nothing happens and the handler keeps happening. Calling on_nth_tick with nil only seems to affect my own mod. This, coupled with the fact that script has a read only member called mod_name makes me think that each mod is using a different script variable. Is there some way to replace a different script's tick handler?
The issue is that the on_nth_tick hook I'd like to unregister comes from a different mod. When I call on_nth_tick with the tick number used by that mod, nothing happens and the handler keeps happening. Calling on_nth_tick with nil only seems to affect my own mod. This, coupled with the fact that script has a read only member called mod_name makes me think that each mod is using a different script variable. Is there some way to replace a different script's tick handler?