Discuss Scratch

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!
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.

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:

defineshakeinitialintensityfalloffsetrotationstyledon't rotatesetforcetoinitialintensityplaysoundboomoptionalrepeatuntilnotforce>0gotox:0y:0pointindirectionpickrandom0to359moveforcestepschangeforceby-1*falloffgotox:0y: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:

whenclickedgoback10layersforeverchangeyby-10wait.05secschangeyby10
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.
HoofEMP
Scratcher
100+ posts

How do I make background shake?

CoolDawg5000 wrote:

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.
That's a bit of a waste. It just creates clutter and gives people with slower computer substantially more lag.
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?

HoofEMP wrote:

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:

defineshakeinitialintensityfalloffsetrotationstyledon't rotatesetforcetoinitialintensityplaysoundboomoptionalrepeatuntilnotforce>0gotox:0y:0pointindirectionpickrandom0to359moveforcestepschangeforceby-1*falloffgotox:0y: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?

HoofEMP wrote:

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:

defineshakeinitialintensityfalloffMybrowser/operatingsystem:WindowsNT10.0,Chrome65.0.3325.181,Flash28.0release0setrotationstyledon't rotateMybrowser/operatingsystem:WindowsNT10.0,Chrome65.0.3325.181,Flash28.0release0Mybrowser/operatingsystem:WindowsNT10.0,Chrome65.0.3325.181,Flash28.0release0Mybrowser/operatingsystem:WindowsNT10.0,Chrome65.0.3325.181,Flash28.0release0Mybrowser/operatingsystem:WindowsNT10.0,Chrome65.0.3325.181,Flash28.0release0Mybrowser/operatingsystem:WindowsNT10.0,Chrome65.0.3325.181,Flash28.0release0Mybrowser/operatingsystem:WindowsNT10.0,Chrome65.0.3325.181,Flash28.0release0Mybrowser/operatingsystem:WindowsNT10.0,Chrome65.0.3325.181,Flash28.0release0Mybrowser/operatingsystem:WindowsNT10.0,Chrome65.0.3325.181,Flash28.0release0Mybrowser/operatingsystem:WindowsNT10.0,Chrome65.0.3325.181,Flash28.0release0Mybrowser/operatingsystem:WindowsNT10.0,Chrome65.0.3325.181,Flash28.0release0Mybrowser/operatingsystem:WindowsNT10.0,Chrome65.0.3325.181,Flash28.0release0Mybrowser/operatingsystem:WindowsNT10.0,Chrome65.0.3325.181,Flash28.0release0Mybrowser/operatingsystem:WindowsNT10.0,Chrome65.0.3325.181,Flash28.0release0Mybrowser/operatingsystem:WindowsNT10.0,Chrome65.0.3325.181,Flash28.0release0setforcetoinitialintensityplaysoundboomoptionalrepeatuntilnotforce>0gotox:0y:0pointindirectionpickrandom0to359moveforcestepschangeforceby-1*falloffgotox:0y: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?

nlin060 wrote:

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!
Use the select tool to select the entire backdrop and paste it into a sprite. Then do this:
whenclickedshowsetIntencityto5switchcostumetoshakeyshakeygotox:0y:0repeatidcchangeybyIntencitychangeybyIntencity*-1

Last edited by EnderGamer555 (April 12, 2018 00:32:07)

asivi
Scratcher
1000+ posts

How do I make background shake?

repeatchangexbypickrandom-3to3*5changeybypickrandom-3to3*5waitsecs
PedroCerra
New Scratcher
1 post

How do I make background shake?

cs544305 wrote:

Do it as a sprite:

whenclickedgoback10layersforeverchangeyby-10wait.05secschangeyby10

¡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
asivi
Scratcher
1000+ posts

How do I make background shake?

HoofEMP wrote:

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?

whenclickedforevermove2stepswaitThemoresmallernumber,themoreforceappliedsecsmove-2stepswaitsamenumberasbeforesecs

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?

catt1234 wrote:

I don't think you can change backgrounds(even a code expert can't help me)!
You literally just do:
switchbackdropto Another backdrop
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)

hyperpoly67
Scratcher
3 posts

How do I make background shake?

I still don't know

Powered by DjangoBB