Confused about "Use loader layout..."

  • I've done some research on this topic but I'm still a little confused. (Seems to happen more and more as I get older. <sigh>)

    I created a custom loading screen and my event sheet for it looks like this:

    First, am I doing that right?

    Second, I didn't initially have the layout marked as "Use loader layout..." and I'm sort of confused about what that option actually does. Does it negate the need for the events above? I haven't really noticed a difference whether I use it or not.

    I'm asking because I'm having a small issue with my app not getting files from updates. Here's the problem:

      1. I upload a new Project File (.json) and a new offline.appcache file 2. I go to my website 3. My app recognizes that there is an update and it *seems* to get the new version 4. When my app starts the Project File hasn't been updated 5. The Project File isn't updated until I refresh the browser window

    This makes me think the error is in my events that download the Project File, but they *look* okay.

    Thanks for any help.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hello,

    To use loader layout you have to select the first layout to display in the project settings, and set "Use loader layout" to "yes".

    Then, in the selected layout event sheet, you have to set the system condition "On loader layout complete" that is triggered when everything is loaded.

    If you have only few ressources to load, you won't see the difference because it loads relatively fast.

    For the project file I think you should use AJAX object to make request and wait for AJAX "On completed" event.

    Hope this helped. Nabu

  • Thanks Nabu0001, I wasn't aware of the "On loader layout complete" condition. It sounds like that is mainly for projects that have a lot of assets, correct? (And it's NOT a replacement for the events I have listed above.)

  • No it's not mainly for big projects. It ensures that all ressources are loaded before doing anything. It's not a replacement for what you're already doing, it just loads all the graphics and the sounds if you have set the "Preload sounds" in the project properties.

    What you can do is wait for "On loader layout complete" to trigger and wait for the AJAX server side requests during the loader layout, while displaying a progression bar or something like that. Once all these things are done - you can here use variables for completion - you change to your next app layout.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)