Load a layout inside an other

0 favourites
  • 9 posts
From the Asset Store
Plugin Transition Layout C3. Layout opening and closing animation for C3. Quickly set up transitions between lay
  • Is even possible to load a layout inside a layout that is running??

    Let me explain a bit better. I need to enable a secret area that has been created inside an other layout without stopping the main layout running. Is possible to do that in any way?

  • The layout doesn't have to be on screen and visible to enable things on it. You can run functions on the secret area to enable it while the main layout is on screen if you want.

  • could you further talk on this of you have the time? A couple weeks ago I tried to the same thing but failed. Imagine an enemy in the secret place you want to "find path" and "check for collisions" with other elements in the secret place. But since the secret place is on another layout no one is moving until you go to that layout, even if you include it's event sheet? So you can "goto secret place layout" but then main "layout" stops, and you just can't run both of them together.

    The way to solve this was to mathematically model all the behaviours and events in both the secret place and the main area in an event sheet, and update each tick. Upon entering the secret place you draw secret place objects, and upon exiting you draw normal place objects.

    Which was borderline impossible/unneccesarily long to implement and debug.

    v00d0, what I did to solve my problem can be described as:

    1-)Use a large layout

    2-)Use a global variable to keep current location ie outside, inside secret place

    3-)Place your secret place sprites somewhere in the layout, way far from outside sprites

    4-)Define camera limits for outside and inside

    5-)Switch player location and camera when entering/leaving the secret place.

    I hope I could describe it :)

  • Ok to explain my problem better i'll try to describe the game.

    This game is a DB of songs that an italian singer has made for childrens. These songs are represented inside a scenario with wich you can interact while listening the song.

    So at a certain point of the song this hidden area will be activated and players will be be able to interact in this new area, while we are in this new area, the song must continue to play from where it was left, and all the layout must still be alive. So the problem is this, i need to zoom to this place and get inside the cave where i do something for 10 second and then i go out. If i could wrap a layout inside an other.

    Anyway thanks a lot.

  • Either make a REALLy large level or use a method to transition between layouts.

    There is noway to load a layout onto another layout.

    What could do is spend a lot of effort to create a streaming based level loader. but the prior two suggestions are better for what you want.

  • But my layout size is equal to the ipad3 resolution so when it goes on tablets and smartphone can be resized without problems. If i make a larger layout how will work the resize?

  • You mistaking Layout size and Canvas size.

    Your canvas size is the display that users will see at anyone time. The Layout size is the size of the game map.

    You need to read the tutorial. I would suggest read the basic tutorial before going any farther. This tutorial is by far shuold be mandatory read. It teaches the fundamentals. Don't skip it :)


  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • oh well, i always learn new software by using them. I'll give a look at that tutorial, thanks guys.

  • I always learn software by using it as well, but that also means looking at examples (a lot of them are provided with the download and many others are here on the forums)

    Following a tutorial that isn't about what you want to achieve isn't a very nice thing to do, but it does provide you with basic (and as such) nescessary information about the use of Construct2.

    This basic information will help you also when asking for solutions to event-creating, because you have a far greater understanding of the possibilities and the way things are done. (and for the right names of certain aspects of your project.)

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