Thank you @britzl and @Ragnar_Svensson.
I have sort it now.
One thing that confused me for a long time is that
This code doesn’t work
function init(self)
msg.post("loaderobject#introductionproxy", "load")
print("loading")
end
function on_message(self, message_id, message, sender)
if message_id == hash("proxy_loaded") then
print("loaded")
msg.post(sender, "init")
msg.post(sender, "enable")
end
end
function on_message(self, message_id, message, sender)
-- Add message-handling code here
-- Remove this function if not needed
end
But this code does. I guess the reason will be obvious to most people but for a beginner it’s not intuitive.
function init(self)
msg.post("loaderobject#introductionproxy", "load")
print("loading")
end
function on_message(self, message_id, message, sender)
if message_id == hash("proxy_loaded") then
print("loaded")
msg.post(sender, "init")
msg.post(sender, "enable")
end
end