How do I switch to another layout, "freeze" the initial layout and come back to it ?

0 favourites
  • 3 posts
From the Asset Store
Helping streamers give their viewers more excitement.
  • Hey everyone!

    I just started learning Construct 3 for my first ever game.

    Let me explain the situation : my whole game is based on a main layout, a map with NPC's to talk to and mini games for each of them. When the player interacts with an NPC, I'd like to move him to a mini-game (which I made on another layout and event sheet) at a certain point in the dialogue. When the mini-game is finished, he moves back to the map and the dialogue resumes, and finishes. At the end of each conversation/mini-game, you can't interact with the same NPC again and the player must find the next NPC who will give him another minigame and so on...

    There is 4 NPC's so I dont think it will be too "heavy".

    I already made a .json array with the dialogues and made a loop that reads the dialogue well. But the problem is : I want the player to go to the mini-game in a middle of the dialogue (in a middle of the loop). I don't know how could I freeze/save the map layout, play the mini-game and then comeback at the exact same state. Or maybe there is another solution like making the minigame a global layer and put it on top ?

    Here is a screenshot of the actual loop in the event sheet :

    "Jeu 1" is the mini-game layout. "FIN" indicates the end of the dialogue in the array. "GAME" indicates when to play the game.

    Thank you for your time and help !!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Anything that needs to keep the same state you can assign 'Persist' behaviour, this means they remain in the same state as when you left the layout.

  • lionz thank you :) I put a persist behavior on all the NPC's + the main player sprite and it worked fine. Exactly what i needed!

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