Why won't my player stay in the screen?

0 favourites
  • 3 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • This is probably a simple question, but as this is my first project in Construct2, I can't seem to solve it. Don't get me wrong, I've browsed the tutorials and checked the forums, but I just can't seem to find a solution.

    Here's the deal: I'm making a Gauntlet-type game with a spaceship, so you basically simply steer the thing through a maze. The only objects are the background (seperate layout called, um, Background, size 1600x1200), four walls (Solid sprites) and the player (Bound to layout, 8 directions movement).

    In the Projects tab to the right of the screen, I have set Unbound scrolling to Yes, and in the Events, I set the Player to check if is outside the layout, and if so, set him back to position 600,600. This is just to get things working, and I'll bugfix it later.)

    The problem is that I can move the player with the arrow keys, and he stops when he reaches a wall. But when he goes outside the screen, the screen does not follow him. What am I missing?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There is an behaviour called scroll to, give your player this behaviour and get rid of the events that make the screen follow him when he reaches the end of the layout (which is the whole game map not the play screen).

    Edit: Have you checked the manual?

    scirra.com/manual/102/scroll-to

    Edit: Sorry for sounding condescending.

  • Ah, thanks! That did the trick. :D

    Manual? Yeah, I looked through it, but there's a lot of take in all at once. I prefer tackling one problem at a time. :)

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