I have read other questions about the same problem however someone just tidied up the code and it fixed itself.
I have also checked that all of the collections do not have the same name in the properties column.
If I take the player collection out of the level collection then I can’t get the correct position of the player, however it has messed up the loader.
Would anyone be able to help me resolve this issue?
Thanks
If you can share the entire project it would be simpler to see what’s going on. You can upload here as a .zip / a file sharing site / put it on GitHub or share it in a PM.
There are multiple errors in that log (btw please post the logs as text, not screenshots!).
Issue 1: It seems like you have more than one collection with the same id (“there is already a socket with the same name”). This is a problem when loading collections using a collection proxy. Select the root of the collection and make sure to give it a unique name.
Issue 2: You may also be running out of resources (“OUT_OF_RESOURCES”). We try to allocate as much as possible up front to avoid dynamic allocations at runtime. I’m not sure if this is correct in this case or only a side-effect of Issue 1. But you can increase the number of game objects per collection in game.project:
I have looked through all of my collections and as far as I can tell they are all different but that may be because I am not looking correctly.
Thank you I have looked at the website but I am not sure what I am supposed to increase in the game.project settings.
Is it under the collection related settings?
Thanks for the help
Ok, so the problem is that you are loading the leaderboard collection more than once. You start loading the leaderboard collection when the player collides with the “win” collision group. And you keep colliding with “win” each frame. My suggestion is that you keep track of which collections you have loaded (in main.script maybe) and only try to load the collection if it is not already loaded. Another alternative is to disable the collision object immediately on collision:
-- in player.script
msg.post("disable", "#collision_win")