I’m using collection proxies to load new levels (through Monarch), so each level has its own socket. The problem is that I have socket-dependant code in my collection:
local col = collectionfactory.create("#bulletfactory", go.get_position() + offset)
local url = msg.url("main", col["/root"], "bullet")
go.set(url, "direction", vmath.vector3(self.facing, 0, 0))
This will break in any level that doesn’t have name “main”.
Is there a better way to handle this URL? Or should I store the socket name somewhere?