Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to make a infinite seamless looping panorama?
- scratch_coder8937
-
25 posts
How to make a infinite seamless looping panorama?
I need a better script in my project (https://scratch.mit.edu/projects/500226543 ) for a panorama.
My script:
It's almost perfect, but it doesn't loop seamlessly. Please help!
My script:
define Panorama
clear
switch costume to [size v]
set size to (500) %
switch costume to [panorama v]
go to x: (() - (((timer) * (20))mod(1500))) y: (0)
It's almost perfect, but it doesn't loop seamlessly. Please help!
Last edited by scratch_coder8937 (March 15, 2021 18:16:29)
- CodeCorps
-
22 posts
How to make a infinite seamless looping panorama?
can you share the project? 

- scratch_coder8937
-
25 posts
How to make a infinite seamless looping panorama?
I thought it's shared…. can you share the project?
- Zizzle8383
-
100+ posts
How to make a infinite seamless looping panorama?
he/she meant share the LINK to the project, it is much easier than us having to go to your profile to try and find it. I thought it's shared….
- The_Imaginarium
-
1000+ posts
How to make a infinite seamless looping panorama?
forever
if <(() - (((timer) * (20)) mod (1500))) > [1475]> then
set [brightness v] effect to (((((timer) * (20)) mod (1500))-(-1475))*(4))
end
if <(() - (((timer) * (20)) mod (1500))) < [25]> then
set [brightness v] effect to (((1)/(((timer) * (20)) mod (1500)))*(100))
end
end
Add this
Your game looks great so far

Last edited by The_Imaginarium (March 15, 2021 21:28:33)
- scratch_coder8937
-
25 posts
How to make a infinite seamless looping panorama?
No, it led to a 404 page because of an extra character at the end of the link. The project was shared yesterday.he/she meant share the LINK to the project, it is much easier than us having to go to your profile to try and find it. I thought it's shared….
- scratch_coder8937
-
25 posts
How to make a infinite seamless looping panorama?
Wow, thank you so much!forever
if <(() - (((timer) * (20)) mod (1500))) > [1475]> then
set [brightness v] effect to (((((timer) * (20)) mod (1500))-(-1475))*(4))
end
if <(() - (((timer) * (20)) mod (1500))) < [25]> then
set [brightness v] effect to (((1)/(((timer) * (20)) mod (1500)))*(100))
end
end
Add this
Your game looks great so far

- scratch_coder8937
-
25 posts
How to make a infinite seamless looping panorama?
Sadly, the script doesn't work… maybe it's because of the brightness blocks?forever
if <(() - (((timer) * (20)) mod (1500))) > [1475]> then
set [brightness v] effect to (((((timer) * (20)) mod (1500))-(-1475))*(4))
end
if <(() - (((timer) * (20)) mod (1500))) < [25]> then
set [brightness v] effect to (((1)/(((timer) * (20)) mod (1500)))*(100))
end
end
Add this
Your game looks great so far
- The_Imaginarium
-
1000+ posts
How to make a infinite seamless looping panorama?
It worked for me… let me look at it more. Maybe I wrote it down wrong…
- The_Imaginarium
-
1000+ posts
How to make a infinite seamless looping panorama?
It's fixed(or it should be)
forever
if <(() - (((timer) * (20)) mod (1500))) < [-1475]> then
set [brightness v] effect to (((((timer) * (20)) mod (1500))-(-1475))*(4))
end
if <(() - (((timer) * (20)) mod (1500))) > [-25]> then
set [brightness v] effect to (((1)/(((timer) * (20)) mod (1500)))*(100))
end
end
Last edited by The_Imaginarium (March 15, 2021 21:33:20)
- scratch_coder8937
-
25 posts
How to make a infinite seamless looping panorama?
But why the brightness blocks? Can you explain how it works? It still isn't working for me… It's fixed(or it should be)forever
if <(() - (((timer) * (20)) mod (1500))) < [-1475]> then
set [brightness v] effect to (((((timer) * (20)) mod (1500))-(-1475))*(4))
end
if <(() - (((timer) * (20)) mod (1500))) > [-25]> then
set [brightness v] effect to (((1)/(((timer) * (20)) mod (1500)))*(100))
end
end
- The_Imaginarium
-
1000+ posts
How to make a infinite seamless looping panorama?
The brightness will get dark at the end, then will get light in the beginning.
Which doesn't make it seamless.
But if you wanted to make it seamless, you would have to edit your art, not your scripts.
Add the blocks inside the forever script into the panorama custom block.
Which doesn't make it seamless.
But if you wanted to make it seamless, you would have to edit your art, not your scripts.
Add the blocks inside the forever script into the panorama custom block.
Last edited by The_Imaginarium (March 15, 2021 22:31:43)
- scratch_coder8937
-
25 posts
How to make a infinite seamless looping panorama?
Ok, now I get it! I though it was a script to make the panorama loop, not to make it seamless. It works! But, after it loops 1 time it turns white…. The brightness will get dark at the end, then will get light in the beginning.
Which doesn't make it seamless.
But if you wanted to make it seamless, you would have to edit your art, not your scripts.
Add the blocks inside the forever script into the panorama custom block.
- The_Imaginarium
-
1000+ posts
How to make a infinite seamless looping panorama?
A different strategy:
foreverThis is simpler and more effective. I wonder why this didn't occur to me immediately.
if <(() - (((timer) * (20)) mod (1500))) < [-1475]> then
change [brightness v] effect by (-4)
end
if <(() - (((timer) * (20)) mod (1500))) > [-25]> then
change [brightness v] effect by (4)
end
end
- scratch_coder8937
-
25 posts
How to make a infinite seamless looping panorama?
Yay, it finally works. Thank you! A different strategy:foreverThis is simpler and more effective. I wonder why this didn't occur to me immediately.
if <(() - (((timer) * (20)) mod (1500))) < [-1475]> then
change [brightness v] effect by (-4)
end
if <(() - (((timer) * (20)) mod (1500))) > [-25]> then
change [brightness v] effect by (4)
end
end

Last edited by scratch_coder8937 (March 16, 2021 00:44:07)
- The_Imaginarium
-
1000+ posts
How to make a infinite seamless looping panorama?
I don't think that's a scripting problem, that's an art problem.
- scratch_coder8937
-
25 posts
How to make a infinite seamless looping panorama?
Maybe, but I'm pretty sure it can be accomplished with code. I saw a project that made a panorama loop perfectly, but that user wouldn't let anyone use their code. I don't think that's a scripting problem, that's an art problem.

- Oumuamua
-
1000+ posts
How to make a infinite seamless looping panorama?
Maybe, but I'm pretty sure it can be accomplished with code. I saw a project that made a panorama loop perfectly, but I don't think that's a scripting problem, that's an art problem.that user wouldn't let anyone use their code.
Don´t worry, you just get anything you need and give they credit.
- Discussion Forums
- » Help with Scripts
-
» How to make a infinite seamless looping panorama?