Today I come back with a new Construct Time: a loading screen !
First of all, the file is publicly available on my Patreon: patreon.com/posts/34192987
Making a simple loading screen in Construct 3 is very easy, and that's thanks to the great new image loading actions Construct 3 added.
How it works
All you need is one Global variable, and one built-in Function.
Here, we make use of the fact that built in functions are available everywhere in the project, even without including the event sheet.
When you call a built in function from outside it's event sheet, you can only access the global scope and the function's scope. Trying anything that reaches outside of the scope of the function in the local scope of the event sheet (like setting local variables etc) will not work.
We make use of that to have code that will only run on the LoaderLayout right next to code that can be executed from anywhere.
Everything else is very simple to understand: the Go To Layout function sets the global variable that keeps in mind the layout to load, and then sets the current Layout to the LoaderLayout.
All the LoaderLayout does is load the images from the target layout and show the progress on a progressbar, and when it's done, goes to the target layout.