How do I Keep the Player and Camera Moving Specifically?

Get help using Construct 2

Post » Thu Sep 21, 2017 1:33 am

So i'm trying to make a sort of top-down game (not a shooter), and I've tried looking through some of the camera tutorials and I couldn't seem to find what I wanted.

I want the player to be able to move freely without the camera moving, but if they move past a certain point (depending on the layout shape and size) the camera would follow the player and they would be kept in the middle until they reach one of the layout's sides.. For example, if the player is moving across a layout they just entered there should be no camera movement. However, if they move further away from the beginning of the layout to the point where they are in the middle of the y-axis or the middle of the x-axis (or both) of the screen, the camera would follow until they hit the end of the layout.

This may sound really simple, but when the player hits the middle, they start moving faster than the ground. I've tried editing the parallax of the layers I have, and either the player won't stay put in the middle (they move far off the screen) or the player is stuck on one side of the screen (the layers move, but the player's position on the screen stays to the left and doesn't move around, just moves on the layout). I want this to work with an object that will be used as a camera, just for the use of cut scenes. Is it because of my layout size? Any property I am missing? Please help!
B
7
S
1
Posts: 14
Reputation: 407

Post » Fri Sep 22, 2017 12:11 pm

I would just set up a camera object with ScrollTo behaviour and when the player reaches the y position you're referring to, you could pin the camera object to the player. The outcome would be a static camera until the player hits the relevant point in the level and from that point the camera moves with the player.
B
47
S
17
G
81
Posts: 2,224
Reputation: 48,095

Post » Sat Sep 23, 2017 7:56 pm

Okay, thanks!
B
7
S
1
Posts: 14
Reputation: 407


Return to How do I....?

Who is online

Users browsing this forum: blackhornet and 24 guests