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: 762
Reputation: 9,615

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
26
S
16
G
10
Posts: 121
Reputation: 7,526

Post » Wed Apr 13, 2016 6:04 pm

Have a look at this:
viewtopic.php?t=87207&start=0
ImageImageImage
B
72
S
22
G
290
Posts: 3,886
Reputation: 159,513

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
92
S
44
G
17
Posts: 1,012
Reputation: 18,607

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: 762
Reputation: 9,615


Return to How do I....?

Who is online

Users browsing this forum: luckyrawatlucky and 10 guests