How do I position the player moving in and out of layouts

0 favourites
  • 3 posts
From the Asset Store
Players follower. use it for anything which follows the player
  • Hey all. I'm creating a small scale Metroidvania type game. So each small layout is a piece of the overall map and when the player reaches the end of the layout, the game fades out and in to another layout. I'm doing this because I couldn't get camera clamping/scrolling to work on large layouts. I'm having problems placing the player in a specific part of the newly loaded layout depending on where he or she "exited" the last layout.

    Hope I'm being clear. I'm trying to figure out the logic or code for this but I can't find any events that might achieve what I'm trying to do. For example, I need to position the player on the far right side of Level 2 if the player enters Level 2 from Level 3. I need to position the player on the far left side of Level 2 if they enter Level 2 by Level 1. Is there some sort of event that would give me control over the position of the player in one layout while in another layout.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Probably use a global variable to store your current LayoutName upon exiting, and on the next layout place the player's start position based on that variable.

  • oosyrag Awesome! Just want to say thanks a lot! I got it working smoothly now. I would have never thought to use global variables to solve this problem. Guess I could use them in a lot of ways!

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