How do I make my player appear outside my building

0 favourites
  • 6 posts
From the Asset Store
Players follower. use it for anything which follows the player
  • How do I make my player appear outside my building after I exit it on a separate layout.

    So i'm making a 2d game and want to enter and exit 2d buildings. I have 2 layouts and I have made exit boxes, one to enter the building from layout 1 (My level) and appear in layout 2 (inside the building) I know how to enter and exit.

    Whats stumping me is that when i get my player to exit layout 2 (inside the building) and return to Layout 1 (My level) The player appears on Layout 1 at the start of the level, I want him to start outside the building where he entered instead of appearing at the start of the level. That might not have been very clear.

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for that, It did help a little but that's quite a complex set of doors. I've made my sprite global which is awesome as i no longer have to place a player at the start of a new level. But when I exit my building, my player is no where to be seen, he might be behind all the layers as i can still move around the screen but I cant see him.

    Ahhh Its because he gets destroyed from each layout because hes a global , so after exiting the building hes not there. How do i get him to spawn again.

  • GThreepwood try this tutorial might help you if not click under my profile link it will take you to some tutorial I have created

    https://www.scirra.com/tutorials/532/ho ... creen-game

  • GThreepwood try this tutorial might help you if not click under my profile link it will take you to some tutorial I have created

    Thanks Lord Shiva, That tutorial is pretty much exactly what i was doing. But I'm making the player overlap the exit box and hold down to exit the building. If the player is set to global, he doesnt reappear but i still have control. If hes not global, he just reappears at the start of the level, not at the position he exited the building from.

  • Thank for the help everyone.

    I created a global variable with a value of 0. When exiting my building, 1 is added to the global variable.

    On the start of layout for the previous level, I checked the global variable and if it was 1, i positioned the player at the exit box. Your help was incredible. Thanks for the amazing support,

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