How do I scroll the background

Get help using Construct 2

Post » Thu Feb 12, 2015 9:31 pm

For this subject, I'm following the auto-runner template to make a scrolling background which has bullet behavior.
The template code which I'm using:
Untitled-1.jpg


I don't know what I'm missing because my background doesn't scroll correctly. It's jumping to the X I'm setting instead of how the background's template is working and all it's doing to achieve that is this code.

Could someone help me on that?Appreciated!
You do not have the required permissions to view the files attached to this post.
B
54
S
21
G
3
Posts: 601
Reputation: 6,560

Post » Fri Feb 13, 2015 4:08 am

Nobody? :/
B
54
S
21
G
3
Posts: 601
Reputation: 6,560

Post » Fri Feb 13, 2015 4:19 am

Unfortunately showing us some valid code doesn't help at all :) As you say it works in the template, so.. must be something else.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Fri Feb 13, 2015 4:26 am

My hunch is that your object isn't identical in tile size. That would cause it to jump. Also, if your object is an odd count of tiles wide (like 15) .

But codah is right, we need more to tell you anything.
Image
B
32
S
11
G
2
Posts: 563
Reputation: 5,096

Post » Fri Feb 13, 2015 4:57 am

@codah , @ruskul

My tile's original width is 512 and i'm setting it to 2048. It has bullet behavior like in the template. Regarding to the background, I don't know what else could I say beside everything I said. The code is the same and the width is right (4*512=2048).
B
54
S
21
G
3
Posts: 601
Reputation: 6,560

Post » Fri Feb 13, 2015 6:13 am

@kossglobal is that shot of the template or your code. can you post a shot of your code as you might think it's the same but something could be off
B
42
S
17
G
2
Posts: 850
Reputation: 6,209

Post » Fri Feb 13, 2015 6:19 am

I had the same issue in one of my games, first i noticed that it was an odd number that caused an issue as stated above and i also noticed my background was tiled a little to far so the end of the back ground didnt line up with the beginning, also what was stated above. Check out those two things what these guys mentioned.
B
8
S
1
Posts: 17
Reputation: 410

Post » Fri Feb 13, 2015 6:38 pm

@PL4Life52 , @volkiller730

I'm here to say that was the tile map. What I was misunderstanding is that the tile BG not necessarily have to be multiple of two but the end of the background have to align perfectly to the beginning, which I was already looking for but I thought that only multiplying by 2 would be enough. Thanks everyone.
B
54
S
21
G
3
Posts: 601
Reputation: 6,560


Return to How do I....?

Who is online

Users browsing this forum: reddragon09 and 8 guests