OnStartOfLayout trigger while executing offical load action

0 favourites
  • 4 posts
From the Asset Store
11 loops of RPG, chiptune/8-bit music. Suitable for any pixel art game.
  • Problem Description

    OnStartOfLayout trigger while executing official load action

    Attach a Capx

    https://onedrive.live.com/redir?resid=7 ... ile%2ccapx

    Description of Capx

    Click, it would do saving, then go to next layout, then do loading

    Steps to Reproduce Bug

    • (layout1) Print "Start L1" from OnStartOfLayout trigger
    • (layout1) Click ( touch) to do saving
    • (layout1) saving complete, got to layout 2
    • (layout2) Print "Start L2" from OnStartOfLayout trigger, then do loading
    • (layout1) Print "Start L1" from OnStartOfLayout trigger

    Observed Result

    OnStartOfLayout is triggered while loading. (Print "Start L1")

    In the source code, OnStartOfLayou event will be fired while layout start, include official loading.

    Expected Result

    OnStartOfLayout (Print "Start L1") should not be fired while loading, imo.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    window7, 32 bit

    Construct 2 Version ID


  • I can reproduce, but it doesn't appear to be a regression so I won't do anything before the next stable release which is due soon.

    However I'm not sure it's really a problem in practice: it fires 'On start of layout' to switch to the correct layout just before actually loading the savegame state, so anything the 'On start of layout' event does should be reverted by the subsequent loading. Is this a problem for a real-world project of yours?

  • Ashley

    You are right, status will be reverted by the subsequent loading, except non-saved status.

    For example, to count the playing time of this level:

    Designer might increase playing counter which saved in localstorage/post to server while starting this level by "On start of layout".

    When player continues the game by loading status, the playing counter will be increased again. It might be a problem, imo.

    ( Or private variables changing in sprite with no-save behavior... etc. )

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Changed for the next build.

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