Multiple layout working and selection ?

0 favourites
  • 6 posts
From the Asset Store
Selection frame like in RTS games, works both on mobile and desktop devices.
  • Hello to all,

    First sorry for my english that's definitely not perfect :)

    I'm quite new with construct3, and I don't believe that these two questions were already asked in the forum.

    I have multiple layouts, one for the main game, and another for a building. In the building layout, sprites are supposed to move all the time with the "move to" behaviour. It's working perfectly as long as I stay in this layout.

    The first problem I currently have is that when switching to the main layout, all the sprites in the building layout stop moving, despite global or persist activated. Is there anything that can be done to keep another layout "working" ?

    Second problem is the following : I have on the events of the building layout a lot of conditions based on sprites selection. Once more, as soon as I switch to main layout, all conditions seem to stop working, as if these sprites are not available to select...

    Is there a miracle solution for that ?

    I tried a global layer but it is completely messing with my behaviour. To give an example, I sometimes create a sprite on the global layer during gameplay, which is #2 on one layout and #10 on another, and sometimes it creates it ... on #7 ?!

    I have a few ideas to solve the problem by changing the entire building layout event, but if there is a miracle solution for these, thanks for letting me know :)

    Sincerely,

    John

  • Hello,

    If the events are in two different event sheets check if you need to include one sheet inside the other so the events are available in both event sheets.

    To include, go to an event sheet and press “n”, you’ll be asked which event sheet you like to include.

  • Hello,

    thank for you for the answer.

    Yes I forgote about that, but the main event sheet already includes the building one...

    My understanding is that sprites, even when global, stop all of their behaviour and "pause" when you leave the layout they are put into.

    Is that correct ?

    John

  • If I’m understanding you correctly, my answer is yes, conditions needs to be triggered again for the actions to be executed.

    On start of layout is useful to initially make sure actions are executed at the start of an layout.

  • Try Construct 3

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

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

    I am a bit confused... it works now. I guess by just reviewing the code I corrected something.

    Thanks for the reply anyway :)

    John

  • Good that it works 👍

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