Using Monarch I haven’t yet come up with a good way to send messages to the various screens. Gameanalytics keep reporting errors like this:
ERROR:SCRIPT: /main/main.gui_script:40: Could not send message 'test' from 'main:/main#main' to 'test:/test#test'.
stack traceback:
[C]:-1: in function post
/main/main.gui_script:40: in function </main/main.gui_script:37>
I’ve tried using monarch.is_visible() to check whether the screen is available to send messages to, but this doesn’t always work. See an example project: MessageSending.zip (4.8 KB)
One solution I have found that consistently works is for each screen to register init() and final() to a custom module. Is this the best option to make sure the error above is not reported when using Monarch?