Discuss Scratch
- Discussion Forums
 - » Help with Scripts
 - » How to make a infinite seamless looping panorama?
        
         
- scratch_coder8937
 - 
                            
						
						
                            Scratcher
                        
						
						 
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
 - 
                            
						
						
                            Scratcher
                        
						
						 
22 posts
How to make a infinite seamless looping panorama?
can you share the project? 
                        
                        
                    
- scratch_coder8937
 - 
                            
						
						
                            Scratcher
                        
						
						 
25 posts
How to make a infinite seamless looping panorama?
can you share the project?I thought it's shared….
- Zizzle8383
 - 
                            
						
						
                            Scratcher
                        
						
						 
100+ posts
How to make a infinite seamless looping panorama?
I thought it's shared….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.
- The_Imaginarium
 - 
                            
						
						
                            Scratcher
                        
						
						 
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
 - 
                            
						
						
                            Scratcher
                        
						
						 
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.I thought it's shared….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.
- scratch_coder8937
 - 
                            
						
						
                            Scratcher
                        
						
						 
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
 I will add this to my project and see how it works. Thank you!!- scratch_coder8937
 - 
                            
						
						
                            Scratcher
                        
						
						 
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
 - 
                            
						
						
                            Scratcher
                        
						
						 
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
 - 
                            
						
						
                            Scratcher
                        
						
						 
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
 - 
                            
						
						
                            Scratcher
                        
						
						 
25 posts
How to make a infinite seamless looping panorama?
It's fixed(or it should be)But why the brightness blocks? Can you explain how it works? It still isn't working for me…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
 - 
                            
						
						
                            Scratcher
                        
						
						 
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
 - 
                            
						
						
                            Scratcher
                        
						
						 
25 posts
How to make a infinite seamless looping panorama?
The brightness will get dark at the end, then will get light in the beginning.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….
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
 - 
                            
						
						
                            Scratcher
                        
						
						 
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
 - 
                            
						
						
                            Scratcher
                        
						
						 
25 posts
How to make a infinite seamless looping panorama?
A different strategy:Yay, it finally works. Thank you!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
 I added it into my project. But do you know if there is a script that could make the panorama loop endlessly? This is great, but I want to see if anyone can make a script that does that.Last edited by scratch_coder8937 (March 16, 2021 00:44:07)
- The_Imaginarium
 - 
                            
						
						
                            Scratcher
                        
						
						 
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
 - 
                            
						
						
                            Scratcher
                        
						
						 
25 posts
How to make a infinite seamless looping panorama?
I don't think that's a scripting problem, that's an art problem.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.

- Oumuamua
 - 
                            
						
						
                            Scratcher
                        
						
						 
1000+ posts
How to make a infinite seamless looping panorama?
I don't think that's a scripting problem, that's an art problem.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.
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? 
         
            



