Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do I make background shake?
- nlin060
-
New Scratcher
1 post
How do I make background shake?
I want to make an Earthquake-feel. But I don't know how to make the background shake, if that even is possible?
All help is much appreciated, thank you so much in advance!
All help is much appreciated, thank you so much in advance!
- CutieCow17
-
Scratcher
1000+ posts
How do I make background shake?
You could try using a sprite for the background, zoom it in a little and then code it to shake and move.
- P1GG1EP0W3R
-
Scratcher
8 posts
How do I make background shake?
Good question!
I hope my answer is just as good too!
Maybe, instead of using a backdrop, use a sprite instead. I've seen people do this before so I know it works, by the way. Use the sprite and click on “Movement.” Then, you can make it glide back and forth or rotate it. I dunno if that'll suit your project… but it's another idea! Really good question!
If you'd like, check out my featured project on my profile. It would mean SO MUCH to me if you did.





I hope my answer is just as good too!
Maybe, instead of using a backdrop, use a sprite instead. I've seen people do this before so I know it works, by the way. Use the sprite and click on “Movement.” Then, you can make it glide back and forth or rotate it. I dunno if that'll suit your project… but it's another idea! Really good question!
If you'd like, check out my featured project on my profile. It would mean SO MUCH to me if you did.






Last edited by P1GG1EP0W3R (May 17, 2017 03:15:21)
- HoofEMP
-
Scratcher
100+ posts
How do I make background shake?
If you mean screen shaking like in Ace Attorney, then do the following:
1. Make your backdrop entirely black
2. Create a sprite for the background and bring it back every layer
3. Use the following script:
note: setting (falloff) to anything other than a positive number will cause the shaking to be infinite
1. Make your backdrop entirely black
2. Create a sprite for the background and bring it back every layer
3. Use the following script:
define shake (initial intensity) (falloff)
set rotation style [don't rotate v]
set [force v] to (initial intensity)
play sound [boom v]//optional
repeat until <not <(force) > [0]>>
go to x: (0) y: (0)
point in direction (pick random (0) to (359))
move (force) steps
change [force v] by ((-1) * (falloff))
end
go to x: (0) y: (0)
note: setting (falloff) to anything other than a positive number will cause the shaking to be infinite
Last edited by HoofEMP (May 17, 2017 22:32:58)
- cs544305
-
Scratcher
13 posts
How do I make background shake?
Do it as a sprite:
when green flag clicked
go back (10) layers
forever
change y by (-10)
wait (.05) secs
change y by (10)
end
- CoolDawg5000
-
Scratcher
67 posts
How do I make background shake?
Really cool question!
I've actually done something like that before just recently. Some say a sprite would be easier, but I wouldn't go that direction, especially if you need to click and drag lots of other sprites around it. Just make one backdrop and duplicate it to go left sometimes and right some others. https://scratch.mit.edu/projects/160229686/ . This demonstrates ways you can make the background move with the actual backdrops.
I've actually done something like that before just recently. Some say a sprite would be easier, but I wouldn't go that direction, especially if you need to click and drag lots of other sprites around it. Just make one backdrop and duplicate it to go left sometimes and right some others. https://scratch.mit.edu/projects/160229686/ . This demonstrates ways you can make the background move with the actual backdrops.
- HoofEMP
-
Scratcher
100+ posts
How do I make background shake?
Really cool question!That's a bit of a waste. It just creates clutter and gives people with slower computer substantially more lag.
I've actually done something like that before just recently. Some say a sprite would be easier, but I wouldn't go that direction, especially if you need to click and drag lots of other sprites around it. Just make one backdrop and duplicate it to go left sometimes and right some others. https://scratch.mit.edu/projects/160229686/ . This demonstrates ways you can make the background move with the actual backdrops.
- kanishka_maiti
-
Scratcher
30 posts
How do I make background shake?
it cannot shake! only sprites can shake!
- cs951671
-
New Scratcher
2 posts
How do I make background shake?
If you mean screen shaking like in Ace Attorney, then do the following:
1. Make your backdrop entirely black
2. Create a sprite for the background and bring it back every layer
3. Use the following script:define shake (initial intensity) (falloff)
set rotation style [don't rotate v]
set [force v] to (initial intensity)
play sound [boom v]//optional
repeat until <not <(force) > [0]>>
go to x: (0) y: (0)
point in direction (pick random (0) to (359))
move (force) steps
change [force v] by ((-1) * (falloff))
end
go to x: (0) y: (0)
note: setting (falloff) to anything other than a positive number will cause the shaking to be infinite
- cs951671
-
New Scratcher
2 posts
How do I make background shake?
If you mean screen shaking like in Ace Attorney, then do the following:
1. Make your backdrop entirely black
2. Create a sprite for the background and bring it back every layer
3. Use the following script:define shake (initial intensity) (falloff)
My browser / operating system: Windows NT 10.0, Chrome 65.0.3325.181, Flash 28.0 (release 0)set rotation style [don't rotate v]
My browser / operating system: Windows NT 10.0, Chrome 65.0.3325.181, Flash 28.0 (release 0)My browser / operating system: Windows NT 10.0, Chrome 65.0.3325.181, Flash 28.0 (release 0)My browser / operating system: Windows NT 10.0, Chrome 65.0.3325.181, Flash 28.0 (release 0)My browser / operating system: Windows NT 10.0, Chrome 65.0.3325.181, Flash 28.0 (release 0)My browser / operating system: Windows NT 10.0, Chrome 65.0.3325.181, Flash 28.0 (release 0)My browser / operating system: Windows NT 10.0, Chrome 65.0.3325.181, Flash 28.0 (release 0)My browser / operating system: Windows NT 10.0, Chrome 65.0.3325.181, Flash 28.0 (release 0)My browser / operating system: Windows NT 10.0, Chrome 65.0.3325.181, Flash 28.0 (release 0)My browser / operating system: Windows NT 10.0, Chrome 65.0.3325.181, Flash 28.0 (release 0)My browser / operating system: Windows NT 10.0, Chrome 65.0.3325.181, Flash 28.0 (release 0)My browser / operating system: Windows NT 10.0, Chrome 65.0.3325.181, Flash 28.0 (release 0)My browser / operating system: Windows NT 10.0, Chrome 65.0.3325.181, Flash 28.0 (release 0)My browser / operating system: Windows NT 10.0, Chrome 65.0.3325.181, Flash 28.0 (release 0)My browser / operating system: Windows NT 10.0, Chrome 65.0.3325.181, Flash 28.0 (release 0)set [force v] to (initial intensity)
play sound [boom v]//optional
repeat until <not <(force) > [0]>>
go to x: (0) y: (0)
point in direction (pick random (0) to (359))
move (force) steps
change [force v] by ((-1) * (falloff))
end
go to x: (0) y: (0)
note: setting (falloff) to anything other than a positive number will cause the shaking to be infinite
- EnderGamer555
-
Scratcher
35 posts
How do I make background shake?
I want to make an Earthquake-feel. But I don't know how to make the background shake, if that even is possible?Use the select tool to select the entire backdrop and paste it into a sprite. Then do this:
All help is much appreciated, thank you so much in advance!
when green flag clicked
show
set [Intencity v] to [5]
switch costume to [shakeyshakey v]
go to x: (0) y: (0)
repeat (idc)
change y by (Intencity)
change y by ((Intencity) * (-1))
end
Last edited by EnderGamer555 (April 12, 2018 00:32:07)
- asivi
-
Scratcher
1000+ posts
How do I make background shake?
repeat ()
change x by ((pick random (-3) to (3)) * (5))
change y by ((pick random (-3) to (3)) * (5))
wait () secs
end
- PedroCerra
-
New Scratcher
1 post
How do I make background shake?
Do it as a sprite:when green flag clicked
go back (10) layers
forever
change y by (-10)
wait (.05) secs
change y by (10)
end
¡The best!

Last edited by PedroCerra (April 12, 2018 09:45:23)
- HoofEMP
-
Scratcher
100+ posts
How do I make background shake?
Oof, right in the necro
mfw i'm a hypocrite
mfw i'm a hypocrite
- asivi
-
Scratcher
1000+ posts
How do I make background shake?
Oof, right in the necro
mfw i'm a hypocrite
Please do not spam or necropost. Thanks.
- Catsarefun
-
Scratcher
57 posts
How do I make background shake?
when green flag clicked
forever
move (2) steps
wait (The more smaller number, the more force applied) secs
move (-2) steps
wait (same number as before) secs
end
Thanks I hope it could help
- lwell72
-
Scratcher
100+ posts
How do I make background shake?
Ur got to make it move but u can’t in a back drop.mall u got to do is make a sprite and move a move block on the background.
- catt1234
-
Scratcher
1 post
How do I make background shake?
I don't think you can change backgrounds(even a code expert can't help me)!
- littlebunny06
-
Scratcher
100+ posts
How do I make background shake?
I don't think you can change backgrounds(even a code expert can't help me)!You literally just do:
switch backdrop to [ Another backdrop v]Edit: BTW that was kinda off topic and I think this is already resolved…
Another edit: This was from 2017 soo it was definitely resolved… Please don't necropost.
Last edited by littlebunny06 (May 2, 2018 15:35:07)
- Discussion Forums
- » Help with Scripts
-
» How do I make background shake?