How does include:event sheet work?

0 favourites
  • 5 posts
From the Asset Store
- This pack is suitable for shooting games, running games, platform games, and side-scrolling...
  • Hello

    I need some clarification regarding included event sheet.

    I use one event sheet to download geodata from

    I have included this sheet to several other sheets and now i have this question...

    Does ajax download starts everytime i change from one to another sheet or is it executed only once even this sheet is included to several others?

    I am doing this becouse user can via click go from one layout to the other before download finishes and i really would not like to accidentaly flood them with requests.

  • When you change layout it executes all of the events for the related event sheet and all included event sheets. if you have set the request action on start of layout or to trigger once then it will run once every time you switch to a layout that is linked to an event sheet that has the ajax events included. I don't know enough about ajax to know if multiple requests is even a problem though.

  • thanks, ill try call for maybe he can tell me more...

    Maybe to set timer for like every 300 seconds to make ajax call? ... can that be set in included event? will timer work independently regarding other layouts/sheets and their execution?

    Problem is that this is an app and users can click and switch layouts quite offten and i really dont need that ajax to be updated very frequently... once per sesson or once per day is quite allright.

    But how to set that? How to set that ajax gets responce even if user switches layout?

  • If it's this geo data then I guess one request on app load then lock it out. You can make the request with the condition that a variable is true, then set the variable to false to block out further requests.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • problem is that user can go to next layout before data loads.... how to continue loading even if layout is changed?

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