I’m trying to load one collection send a message to this collection and have a GUI disable. However, when I insert the message passing to the collection the GUI disable doesn’t work until I do it for a second time.
elseif message_id == hash("start_track1") then
--Loads track collection
msg.post("#track1_proxy", "load")
print('track1 collection loaded')
--stops menu music
sound.stop("#menuMusic")
--Send message of car colour to track1 collection
msg.post("Track1:/Main#Track1", self.carColour)
print("car colour set")
--Disables menu GUI
msg.post("/Object#menu_gui", "disable")
print('menu.gui script disabled')
The message “strack_track1” is received on a button press and the loading and disabling works when I comment out passing the message to track1 collection. Any help much appreciated.