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
124
S
31
G
17
Posts: 1,491
Reputation: 20,056

Post » Fri Sep 14, 2012 5:59 pm

Perhaps activate a sine behavior with a very high frequency?
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,644

Post » Fri Sep 14, 2012 6:42 pm

Shaking sprite example
(place cursor over the sprite)

capx
B
21
S
6
G
8
Posts: 1,215
Reputation: 7,881

Post » Sat Sep 15, 2012 10:00 am

Thanks for the helpful answers, it will be much easier now.
B
124
S
31
G
17
Posts: 1,491
Reputation: 20,056

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
21
S
6
G
8
Posts: 1,215
Reputation: 7,881

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: 414
Reputation: 5,335

Post » Mon Aug 10, 2015 3:23 pm

For the shake of platformer
shake 'em up
ImageImage
B
91
S
43
G
21
Posts: 740
Reputation: 20,450

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: dzert14, yuji567 and 11 guests