I want to do some light maintenence of my mod (using game object) once on every game load, so I do this by subscribing to on_tick and then unsubscribing in it's handler.
Is this the recommended method? Are there any pitfalls I need to look out for? Particularly wrt to multiplayer?
Cheers
Subscribing to on_tick for 1 tick - is it OK?
Re: Subscribing to on_tick for 1 tick - is it OK?
You shouldn't really be doing things on game load, other than setting up metatable and things
What are you doing on load?
Subscribing to events on load is a very typical way to causing desyncs
What are you doing on load?
Subscribing to events on load is a very typical way to causing desyncs
Re: Subscribing to on_tick for 1 tick - is it OK?
Current intent is to close all mod guis that are saved open, remove custom selection-tool from hand, enable personal roboport and such things to give a clean start on resuming play.
Re: Subscribing to on_tick for 1 tick - is it OK?
These things will definitely cause a desync
Re: Subscribing to on_tick for 1 tick - is it OK?
Thanks for advice.