On Start of Layout doesn't work right

0 favourites
  • 6 posts
From the Asset Store
_______ Huge collection of metal fixtures ________
  • Hi.

    I've just found out why the "On start of Layout" actions are not triggered in my project. It's because of the In-Game Menu.

    I have the "On start of Layout" event at the beginning of the event sheet that is triggered.

    I have a group named "Game Engine Pausable" that has lots of other groups with On start of Layout events, too. Only those are not triggered.

    https://www.dropbox.com/s/2qwk4y2zcc6dc ... p.jpg?dl=0

    Here is how it looks the event sheet for the in-game menu.

    https://www.dropbox.com/s/eebmpqcfulwve ... m.jpg?dl=0

    I've made some tests and if I don't deactivate the "Game Engine Pausable" when InGameMenu=1it all works fine, but then some object in the scene are moving when they should not when timescale is 0.

    Anyone knows a workaround for this ?

  • The easiest solution would be to simply move all other "On start of layout" events out of the "Game Engine Pausable" group.

    Or you can investigate why this group becomes deactivated when layout starts. It's hard to tell by these screenshots, but I'm guessing some event momentarily sets InGameMenu to 1.

    Or if you are switching to this layout from some other layout, it's possible that this group is already deactivated when layout starts. Add this to your event #1, it will tell you if the group is active on startup or not:

    Is group "Game Engine Pausable" active -> Browser Log "Group Game Engine Pausable IS ACTIVE"

  • Yes, the easiest solution would be that but the event sheet would look disorganized and I am trying to keep that .

    The issue is that all the events in that group are working, the only ones that are not are the ones with "On start of layout".

  • And I gave you two possible reasons why this could be happening. If your entire group is deactivated during the very first tick when layout is opened, then all "On start of layout" events in it will not be triggered.

  • have an on-start of layout event and put this group there, but make cure it's active

    then right after that have a sub-event that deactivates it

    That way everything should execute before being deactivated

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've added on start of layout ---> set group active for "game engine pausable" since setting the InGameMenu to 0 and modifying other things wasn't enough.

    Thanks guys.

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