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
103
S
27
G
15
Posts: 1,150
Reputation: 17,222

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,400

Post » Fri Sep 14, 2012 6:42 pm

Shaking sprite example
(place cursor over the sprite)

capx
B
19
S
6
G
7
Posts: 1,205
Reputation: 7,298

Post » Sat Sep 15, 2012 10:00 am

Thanks for the helpful answers, it will be much easier now.
B
103
S
27
G
15
Posts: 1,150
Reputation: 17,222

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
19
S
6
G
7
Posts: 1,205
Reputation: 7,298

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
20
S
10
G
6
Posts: 404
Reputation: 5,190

Post » Mon Aug 10, 2015 3:23 pm

For the shake of platformer
shake 'em up
ImageImageImage
B
79
S
33
G
16
Posts: 599
Reputation: 16,161

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: anty21ro, Magistross, mallorcaredes, PavleNikolic and 24 guests