Question on "Go to Layout"

0 favourites
  • 5 posts
From the Asset Store
The ultimate voice pack filled with 1,536 files of .......wav and mp3 of individual numbers, letters, and words (that go
  • Im working on a MetroidVania type game. I want to separate the sections of the map into different layouts to keep performance decent. Naturally this means my character needs to move from one layout to another quite often. The layouts all have their own layer names.

    When using the "Go to layout" action how does construct determine what layer in the new layout is for the player if your layouts have different layer names? Sorry if this question is confusing in any way. Ill give you an example of whats happening with my project.

    My character starts on a layout A with multiple layers. When transitioning to layout B using the Move to layout action it seems to just randomly choose a layer to place the player sprite. This causes a few issues for me.

    This is the code that triggers the transition to the new layout.

  • On start of layout b, player move to suitable layer.

    Or put your player on a layer with the same name or index? Why do you not have a consistent layer for the player on each layout?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • On start of layout b, player move to suitable layer.

    Or put your player on a layer with the same name or index? Why do you not have a consistent layer for the player on each layout?

    Thanks so much for this. Just to make sure I understand, So if I have a layer named "main" for each layout that would work? Or would it be better to have the player layer have the same index?

  • > On start of layout b, player move to suitable layer.

    >

    > Or put your player on a layer with the same name or index? Why do you not have a consistent layer for the player on each layout?

    Thanks so much for this. Just to make sure I understand, So if I have a layer named "main" for each layout that would work? Or would it be better to have the player layer have the same index?

    Both ways work, up to you what you find easier to do. If the layer has the same name on each layout and you include a event sheet with the events triggering "on start of layout > move player to layer (main)" . You can include your custom event sheet to event sheet by right clicking a layout event sheet and include,

    As he said above you can easily move one object from a layer to another on start of layout

  • > > On start of layout b, player move to suitable layer.

    > >

    > > Or put your player on a layer with the same name or index? Why do you not have a consistent layer for the player on each layout?

    >

    > Thanks so much for this. Just to make sure I understand, So if I have a layer named "main" for each layout that would work? Or would it be better to have the player layer have the same index?

    Both ways work, up to you what you find easier to do. If the layer has the same name on each layout and you include a event sheet with the events triggering "on start of layout > move player to layer (main)" . You can include your custom event sheet to event sheet by right clicking a layout event sheet and include,

    As he said above you can easily move one object from a layer to another on start of layout

    THank you all. Your answers were very helpful and actually helped me fix a few bugs I didnt even realize were dude to my layers being unorganized.

    Kind Regards

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