Appear at proper door when switching layouts.

0 favourites
  • 4 posts
From the Asset Store
Random Maze Generator with Door & Key System - tutorial capx
  • I've been messing around with doors and I can't seem to get the player to appear at the doorway on the new layout. Obviously if I set the play to start at the door at the start of the layout it looks like he went through the door but that doesn't help if I have multiple doorways on the layout or a spawn point away from a door. Is there a way to tell the player which door he should appear at on the other side?

    So yeah, I was wondering if anyone had any ideas on how to make a door system between layouts.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Use a global variable for the x and y position that you want to spawn at on the new layout.

    Set these when you travel through the door on the previous layout

  • Give each door the details for the next layout.

  • Sorry, it took me a while to get around to trying this out.

    Anyways this is what I input:

    Unfortunately if I keep the destroy option on it shows me a random spot on the layout upon starting. When I turn it off the doors don't work. I'm not sure how you are choosing the layout name in the coding and I think that may be the problem. When I tried to play with the destroy/spawning settings I wound up with this:

    I tried a couple of other ideas I had which looked like this:

    This works out pretty well if I am going from 'Testarea1' to 'Testarea2' but once I am on 'Testarea2' all the doors don't work despite having the same coding aside from the necessary reversals. It's also really long.

    Any Ideas?

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