Switching Collections The Right Way - Unable To Swith To 2nd Collection?

Hi,

I’m trying to switch collections the “right way”.
I have the company screen collection loading fine.
When I try to switch to the title screen collections it does nothing and spits out this error:

ERROR:GAMEOBJECT: Component '/Screen-1-FAS#proxy_level_2' could not be found when dispatching message 'load' sent from Screen-1-FAS:/Screen-1-FAS#Screen-1-FAS

I’ve uploaded the current project below:
http://fallenangelsoftware.com/stuff/files/RedLightRacer/RedLightRacer.zip

I apologize for all these stupid questions over the past few days…
(unable to comprehend some of the tutorial documentation)

P.S. - Will need a “proper” screen collection change transition

J.

There are no stupid questions. However, there are questions that make it easier or harder for others to help you, and there are questions that make it easier or harder for you to learn.

One example of a question that would make it easy for others to help you would be if you pointed out exactly what you cannot comprehend about the tutorial documentation. If you don’t understand an explanation, or think that it is unclear - post it here! Then there will be a concrete question to answer, and you will be able to move forward in the tutorial with a more solid understanding of Defold. It will also show everyone that you are actively trying to understand and learn, which will make people more likely to write more in-depth answers to the particular parts of the documentation you struggle with. You can also search the forums - chances are that someone else might have had the same issue, and a full discussion about how that part works will already be present, letting you learn faster.

For this current problem, you are trying to load a collection proxy called “/Screen-1-FAS#proxy_level_2”, but no such collection proxy exists as a component of the game object Screen-1-FAS. I would suggest waiting with collection proxies until you have a more solid grasp of the engine, through the tutorials. Nevertheless, an overview of how to do it is available here, though I fear much of it may be of no use to you until you have the basics down.

2 Likes

Ok, stepped away and come back and got it working…

http://fallenangelsoftware.com/stuff/files/RedLightRacer/RedLightRacer.zip

Tomorrow is screen transitions and title screen buttons!

J.

What is the right way depends on the use case. Proxies are primarily built for managing large portions of the game and they come with some memory overhead. You can, of course, use those but for simpler cases you have other options:

  • Spawning collections with collectionfactories.
  • Enabling/disabling and animating objects in collections.
  • For GUIs: keep the ”screens” in a single GUI and animate between them.
  • Make separate GUIs and animate between them.
3 Likes