How do I shake objects or camera without Unbounded scrolling

Get help using Construct 2

Post » Wed Apr 13, 2016 5:42 pm

Hi. I wanted to add some camera shake effects with "Scroll To" Behavior but I wondered if it is possible to shake the screen without enabling "Unbounded scrolling".
With my current layout its not nice to have a big black border around and I use the Warp behavior for the player. Can you shake the camera with other actions or move the whole screen around?

And is there an easy way to shake single objects instead of the whole screen, too?
Bl4ckSh33p-Soft - Custom Software and Indie Games
B
58
S
18
G
6
Posts: 756
Reputation: 9,591

Post » Wed Apr 13, 2016 6:02 pm

I had the same problem several times - and I didnt found a solution yet.

You might create a 1x1 px sprite, center it in your layout (just do layout.X/2 and layout.Y/2) and give it the ScrollTo behavoir. In order to shake, you have to "show the borders". You could also zoom as the ScrollTo sprite as the center (zoom in about 5% or something) and then shake; after the shake zoom back.

Regards,
Proxy
B
24
S
15
G
9
Posts: 118
Reputation: 6,864

Post » Wed Apr 13, 2016 6:04 pm

Have a look at this:
viewtopic.php?t=87207&start=0
ImageImageImage
B
71
S
22
G
258
Posts: 3,791
Reputation: 143,198

Post » Wed Apr 13, 2016 10:25 pm

Someone also made a behavior for shaking objects.

behavior-shake-not-camera_t166389?&start=10&hilit=shake
B
90
S
44
G
17
Posts: 1,012
Reputation: 18,527

Post » Thu Apr 14, 2016 6:04 am

Thanks! I just added a invisible / empty sprite in the Center of the layout and applied the Scroll To and Shake action to it. Seems to work fine even with the default plugin. :)
Bl4ckSh33p-Soft - Custom Software and Indie Games
B
58
S
18
G
6
Posts: 756
Reputation: 9,591


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 4 guests