Problem with collection proxys (SOLVED)

When i load level after another level the level that i loaded didnt work.

Some more information would be helpful, this could be caused by a number of things.

  • Maybe you haven’t sent enable to the loaded collection?
  • Maybe you haven’t sent disable to the previous collection and its displaying on top of it?

Code that is under Load game levels, is used to load game levels.

It’s a little tough to tell from just this code. Could you also post the code where you post the ‘from_game_to_cutscene’ message to loader.script? (that’s a bit of an odd message_id to use for switching levels but to each their own :slight_smile:)

Aside: Have you tried just sticking a few print calls here and there? just to see which branches are firing and which aren’t? That’s what I usually do in these situations.

I suspect if your first level is staying loaded it means it never making it into the if message.world == hash("level_beginner_1") branch, which would suggest that your post is malformed.

Also. For future reference, you can copy and paste code into your posts, if you wrap them in

 ```lua
 your code goes here

it will come out nicely formatted.
1 Like

I agree with what @NSCharles wrote. It’s hard to tell what’s wrong just by looking at the code you’ve posted. Add some print() calls to help you understand what code is being executed and why.

I resolved this problem but this is unusual solution. I created “transition.collection” and after level_1 firstly i load transition and after load level_2.

We recently added this icon to the post editor that inserts the ``` code formatting markup.

4 Likes