Trying to switch screens (company screen to title screen).
I followed the tutorial “Color Slide”.
Everything is coded and setup.
I don’t know how to invoke the change in screens.
If someone could please download my project below and let me know how to do this:
(been trying to get this working for many hours)
When the proxy has loaded you’ll get a “proxy_loaded” message back. When you get “proxy_loaded” you’re ready to show the loaded collection. You do that by posting an “enable” message.
I would recommend that you centralize all of the logic having to do with showing and hiding screens into a controller script. This script keeps track of the currently loaded screen/collection and does the “async_load” and “enable” calls as well as the “unload” call for any previous screen. Here’s an example of this:
This process of dealing with screens in a game has been simplified even further in the Monarch extension:
I added this code to Screen-1-FAS/ScreenFade.script
function update(self, dt)
-- Add update code here
-- Remove this function if not needed
if ScreenFadeStatus == 0 and ScreenFadeAlpha > 0 then ScreenFadeAlpha = ScreenFadeAlpha - 0.1
end
if ScreenFadeStatus == 1 and ScreenFadeAlpha < 1 then
ScreenFadeAlpha = ScreenFadeAlpha + 0.1
if ScreenFadeAlpha == 1 then
msg.post("Screen-1-FAS:/loader#proxy-Title", "async_load")
end
end
go.set( "#ScreenFadeSprite", "tint", vmath.vector4( 1, 1, 1, ScreenFadeAlpha) )
end
But when I run the game I get the following error when the screen is changing:
ERROR:GAMEOBJECT: The collection 'Screen-1-FAS' could not be created since there is already a socket with the same name.
Here is a tip: If you run into trouble, chances are that others have encountered the same thing. You can use the search function on the forum to check:
Searching for information yourself is way, way faster since you get the answer immediately, and there is no need for others to do that work for you or to re-type information that already exist elsewhere.
You seem to be needing help at every step of development. Maybe you should spend more time reading the documentation completely before advancing with the project.
Honestly Jesse, looking at your project, not one of the things that is explained in the tutorial was coded. You did some preliminary setup, nothing more.
Please go through the beginner’s tutorials, step by step. Don’t just skim through the text, do the steps yourself.
I suggest you go through them in the following order: