Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How can I make a moving background (not a scrolling background)?
- YummyDonutLover
-
Scratcher
100+ posts
How can I make a moving background (not a scrolling background)?
Hello, everyone! So as the title says, I would like to know how to make a moving background. THIS IS NOT for a scrolling platformer, it's nothing like that. I also don't want to do one of those things where you keep duplicating the backdrop and just changing it every time, because that takes forever. I would give a link to the project, but first of all, it wouldn't help, and second, the project is nowhere close to being finished soooo… But anyways, I want to make a backdrop that's kind of like a scrolling backdrop, but you don't have to scroll and it just automatically moves. I'm really bad at explaining lol, but thank you and have a good day! 

- LittleHeroFish
-
Scratcher
100+ posts
How can I make a moving background (not a scrolling background)?
A sprite at the very back layer. Doesn't work for pen projects.
- DinkytheDuck
-
Scratcher
9 posts
How can I make a moving background (not a scrolling background)?
Hello, everyone! So as the title says, I would like to know how to make a moving background. THIS IS NOT for a scrolling platformer, it's nothing like that. I also don't want to do one of those things where you keep duplicating the backdrop and just changing it every time, because that takes forever. I would give a link to the project, but first of all, it wouldn't help, and second, the project is nowhere close to being finished soooo… But anyways, I want to make a backdrop that's kind of like a scrolling backdrop, but you don't have to scroll and it just automatically moves. I'm really bad at explaining lol, but thank you and have a good day!I think I understand you need a scrolling background that auto scrolls?
- YummyDonutLover
-
Scratcher
100+ posts
How can I make a moving background (not a scrolling background)?
Yeah, like I need to make a sprite that's walking (and the player doesn't control that, I'm making an animation, not a game), and I have the animation for that, but I want to make it so that when it's walking the background moves and looks like the sprite is traveling.Hello, everyone! So as the title says, I would like to know how to make a moving background. THIS IS NOT for a scrolling platformer, it's nothing like that. I also don't want to do one of those things where you keep duplicating the backdrop and just changing it every time, because that takes forever. I would give a link to the project, but first of all, it wouldn't help, and second, the project is nowhere close to being finished soooo… But anyways, I want to make a backdrop that's kind of like a scrolling backdrop, but you don't have to scroll and it just automatically moves. I'm really bad at explaining lol, but thank you and have a good day!I think I understand you need a scrolling background that auto scrolls?

- LittleHeroFish
-
Scratcher
100+ posts
How can I make a moving background (not a scrolling background)?
then you could use my idea.Yeah, like I need to make a sprite that's walking (and the player doesn't control that, I'm making an animation, not a game), and I have the animation for that, but I want to make it so that when it's walking the background moves and looks like the sprite is traveling.Hello, everyone! So as the title says, I would like to know how to make a moving background. THIS IS NOT for a scrolling platformer, it's nothing like that. I also don't want to do one of those things where you keep duplicating the backdrop and just changing it every time, because that takes forever. I would give a link to the project, but first of all, it wouldn't help, and second, the project is nowhere close to being finished soooo… But anyways, I want to make a backdrop that's kind of like a scrolling backdrop, but you don't have to scroll and it just automatically moves. I'm really bad at explaining lol, but thank you and have a good day!I think I understand you need a scrolling background that auto scrolls?
- YummyDonutLover
-
Scratcher
100+ posts
How can I make a moving background (not a scrolling background)?
A sprite at the very back layer. Doesn't work for pen projects.Oh sorry, I didn't see your post…
But ty! That might help a lot!
Do you know what some code for it might be? That's the part I'm mostly stuck on.
- dertermenter
-
Scratcher
1000+ posts
How can I make a moving background (not a scrolling background)?
Make 2 backdrop sprites. Find what the x position of the sprite is when the backdrop sprite is completely off the screen.
First sprite:
First sprite:
when green flag clickedThe second sprite would be the same apart from the starting x position would be the x position of the sprite when it is off the screen + 5
go to x: (0) y: (0)
forever
change y by (-10) // controls how fast the moving backdrop is. Change this to what you want!
if <(x position) < [240]> then
go to x: (245) y: (0)
end
end
- dertermenter_easy
-
Scratcher
58 posts
How can I make a moving background (not a scrolling background)?
Make 2 backdrop sprites. Find what the x position of the sprite is when the backdrop sprite is completely off the screen.Made a project that does a moving background: https://scratch.mit.edu/projects/464329469/
First sprite:when green flag clickedThe second sprite would be the same apart from the starting x position would be the x position of the sprite when it is off the screen + 5
go to x: (0) y: (0)
forever
change y by (-10) // controls how fast the moving backdrop is. Change this to what you want!
if <(x position) < [240]> then
go to x: (245) y: (0)
end
end
If the furthest -x position you can go still is not off the screen, just use that amount - still works.
The second sprite would be the same apart from the starting x position would be the x position of the sprite when it is off the screen + 5Sorry, this is wrong. Just set it to what the x position is reset to on the first sprite/
- YummyDonutLover
-
Scratcher
100+ posts
How can I make a moving background (not a scrolling background)?
Make 2 backdrop sprites. Find what the x position of the sprite is when the backdrop sprite is completely off the screen.Wow, ok! Tysm! This will help so much!
First sprite:when green flag clickedThe second sprite would be the same apart from the starting x position would be the x position of the sprite when it is off the screen + 5
go to x: (0) y: (0)
forever
change y by (-10) // controls how fast the moving backdrop is. Change this to what you want!
if <(x position) < [240]> then
go to x: (245) y: (0)
end
end

- Discussion Forums
- » Help with Scripts
-
» How can I make a moving background (not a scrolling background)?