Why won't my player stay in the screen?

Get help using Construct 2

Post » Mon Oct 22, 2012 11:41 pm

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?
B
5
Posts: 43
Reputation: 505

Post » Mon Oct 22, 2012 11:44 pm

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?
https://www.scirra.com/manual/102/scroll-to

Edit: Sorry for sounding condescending.lonehangman2012-10-22 23:46:07
B
18
S
9
G
5
Posts: 77
Reputation: 4,946

Post » Mon Oct 22, 2012 11:57 pm

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. :)
B
5
Posts: 43
Reputation: 505


Return to How do I....?

Who is online

Users browsing this forum: Magistross and 13 guests