"Scroll To" Problem

Get help using Construct 2

Post » Thu Dec 06, 2012 12:47 am

Hello,

Its my first post and I'm new with Construct2!

I have followed the tutorial about making a plataform game, but i'm having a problem with "scroll to" behavior.

I have 800x600 for window size and 2040x480 for layout size.

So I assume that layout size is the size of our entire game, and window size is the size of what player see. (correct me if I'm wrong).

I have separate layers for, background, objects in the world and player. (3 in total so far)

I used a playerbox like tutorial said and put the "Scroll To" behavior.

Also i have the Layout Property Unbounded Screen set to "Yes".
And, Parallax Property on background layer set to 50.

Aparently, when player moves i see the background moving, but only till he hits the limits of the window screen, and since windows size is 800 and layout more than that, i dont see the all the layout. I thought the player would walk till he reaches the length of the layout not the window size.

My objective is to make the camera follow the player, and of course i want the player to move along the layout. Also i found another problem, since my player starts at position X:20, of course the camera can't center him, otherwise it would appear white background cause layout is out of the screen.

How can I do that? I think I'm doing something wrong but can't think on the solution.

Help me out, thanks :)



B
3
Posts: 3
Reputation: 406

Post » Thu Dec 06, 2012 5:12 am

Ok guys, solved the problem (more or less)!

I can't actually says what was wrong, maybe some bug or glitch but anyways, i started the project again, did the same things and it works now! Hope not getting another weird error!

In my search i found this post that I will put here just in case someone gets the same problem as me! There are more posts with related problems and different solutions.

http://www.scirra.com/FORUM/how-do-ifrequently-asked-questions_topic45416.html
B
3
Posts: 3
Reputation: 406


Return to How do I....?

Who is online

Users browsing this forum: heliogame, WhosWho, Yahoo [Bot] and 18 guests