Discuss Scratch

Lanste
Scratcher
9 posts

"Map tiling"

Hi,
I copied script from tiling tutorial by MathMathMath (shout out to him) and used it in my testing project to see what I can do with it. The tiling itself works fine, but the top and bottom tiles are always visible in corners.
Thanks for help.

My project: https://scratch.mit.edu/projects/253597321/#editor
Original: https://scratch.mit.edu/projects/106692426/#editor
titanicman200
Scratcher
100+ posts

"Map tiling"

You could try to make it only show when the camera x and y are between specific values, else hide?
sorry literally had like 2 minutes to look at it so far in case you cant do this becuz of a specific thing your trying to do

My latest projects have centered around natural looking landscapes… Fear me and my colorful grids!
Lanste
Scratcher
9 posts

"Map tiling"

But there already is something that does it… or am I wrong? The abs() part

Last edited by Lanste (Oct. 18, 2018 15:20:26)

imfh
Scratcher
1000+ posts

"Map tiling"

The costumes need to be completely filled with color, eg. green in your case, or else scratch won't let the sprites go far enough off the screen.

Scratch to Pygame converter: https://scratch.mit.edu/discuss/topic/600562/
Lanste
Scratcher
9 posts

"Map tiling"

imfh wrote:

The costumes need to be completely filled with color, eg. green in your case, or else scratch won't let the sprites go far enough off the screen.
That was my older version, just different coloured tiles (literally). The same thing happened.. line of not-disappeared tile…

edit: Just changed the sprites for you

Last edited by Lanste (Oct. 18, 2018 15:42:33)

Lanste
Scratcher
9 posts

"Map tiling"

Thanks for replies… solved, I am just dumb and misread one number…
Lanste
Scratcher
9 posts

"Map tiling"

Double dumb… still broken I'am helpless
imfh
Scratcher
1000+ posts

"Map tiling"

When I tried filling the sprites in completely it worked. That could have been because I also tried putting where the sprite is supposed to go into the if statement and forgot to try it with the normal x position and y position though.

Scratch to Pygame converter: https://scratch.mit.edu/discuss/topic/600562/
Lanste
Scratcher
9 posts

"Map tiling"

Have you seen the original project? My point is that his script works well, and my doesn't even though it's the same except positions of tiles.
RokCoder
Scratcher
1000+ posts

"Map tiling"

Have you unshared yours?


Scratch dabbling for fun…

Lanste
Scratcher
9 posts

"Map tiling"

RokCoder wrote:

Have you unshared yours?
*REUPLOADED: https://scratch.mit.edu/projects/253780198/
Lanste
Scratcher
9 posts

"Map tiling"

Strange… I just found out that my problem doesn't occur in offline editor
RokCoder
Scratcher
1000+ posts

"Map tiling"

When you're running it in the online editor, try hitting ctrl-m to see if that makes a difference


Scratch dabbling for fun…

imfh
Scratcher
1000+ posts

"Map tiling"

Lanste wrote:

Have you seen the original project? My point is that his script works well, and my doesn't even though it's the same except positions of tiles.

Yes, I saw his script. When I went your project(just now) and filled the background of every costume in Sprite1 and hit the green flag(important so the clones update), it worked. Maybe a combination of the one number and the sprites not being filled? It also might have something to do with his costumes being vector and going past the paint area.

Scratch to Pygame converter: https://scratch.mit.edu/discuss/topic/600562/
Lanste
Scratcher
9 posts

"Map tiling"

I am seriously confused now. It works… thanks for all replies…

Powered by DjangoBB