Shaking objects

Get help using Construct 2

Post » Fri Sep 14, 2012 4:56 pm

Hi!

I want to shake ojects on the screen (for example is you click on them). How can I do that?

Thank you.glerikud2012-09-14 16:57:12
B
112
S
30
G
17
Posts: 1,352
Reputation: 19,233

Post » Fri Sep 14, 2012 5:59 pm

Perhaps activate a sine behavior with a very high frequency?
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,465

Post » Fri Sep 14, 2012 6:42 pm

Shaking sprite example
(place cursor over the sprite)

capx
B
20
S
6
G
7
Posts: 1,215
Reputation: 7,343

Post » Sat Sep 15, 2012 10:00 am

Thanks for the helpful answers, it will be much easier now.
B
112
S
30
G
17
Posts: 1,352
Reputation: 19,233

Post » Sun Aug 09, 2015 4:42 pm

@chrisbrobs would you still have this capx?
B
34
S
4
G
5
Posts: 84
Reputation: 4,835

Post » Mon Aug 10, 2015 1:45 pm

@skyhunter93

No.. It's 3 years old !
To make the 'shaking sprite' effect, you simply copy the first frame of the animation to the frame 2
and slightly move the 'origin' position on the 2nd frame.
Run the animation on a suitable fast speed and it appears to shake.
B
20
S
6
G
7
Posts: 1,215
Reputation: 7,343

Post » Mon Aug 10, 2015 2:08 pm

Here's another simple, though probably not very professional, way of doing it @skyhunter93 . I used this method to shake the entire screen, not just a button, but it should work just as well for anything that needs shaking. :)
Just repeat the first 3 events as many times as you want to get a shake duration you are happy with and at the end just set the object back to it's inital x,y. You can olso trow in a vibrate event somwhere between the first few lines using @cranberrygame 's vibrate plugin if you want.
Hope it helps.
Image
B
21
S
11
G
6
Posts: 413
Reputation: 5,333

Post » Mon Aug 10, 2015 3:23 pm

For the shake of platformer
shake 'em up
ImageImageImage
B
84
S
38
G
16
Posts: 640
Reputation: 16,959

Post » Mon Aug 10, 2015 4:49 pm

Sorry! Didn't notice this thread was three years old. Thanks for your recommendations, I could do it.
B
34
S
4
G
5
Posts: 84
Reputation: 4,835


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 0 guests