[Request] Camera Shake effect

Get help using Construct 2

Post » Mon Aug 29, 2016 6:15 am

@somebody I'm having troubles setting this up. Tried all different steps here and none of them is doing the shake for me.
B
14
S
5
Posts: 248
Reputation: 1,705

Post » Mon Aug 29, 2016 8:43 am

notnsane wrote:@Somebody, I agree with kamizoto on the duration statement. It shouldn't be uber hard to add another extra parameter where we can input a time measure - a simple "screenshake every X seconds" parameter.

Currently I'm using a Function for this since I kinda despise variables =P http://i.imgur.com/vIKICqQ.png
I'm no programmer so my logic sucks, but if you add that 3rd parameter, I can get rid of the Function "object".


I'm using your events and they won't work for me. Any idea what could be wrong?
B
14
S
5
Posts: 248
Reputation: 1,705

Post » Mon Aug 29, 2016 9:24 am

@Smileh: Are you sure your Layout "Unbounded scrolling" property is set to "Yes" ?
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
293
S
117
G
96
Posts: 7,310
Reputation: 71,069

Post » Mon Aug 29, 2016 10:06 am

Kyatric wrote:@Smileh: Are you sure your Layout "Unbounded scrolling" property is set to "Yes" ?


This is supposed to be an alternative to use unbounded scrolling as far as I know. Otherwise we would just use the scroll to behaviour shake.

Maybe I'm all wrong but Kamizoto refered me to this thread regarding shaking without unbounded scrolling
B
14
S
5
Posts: 248
Reputation: 1,705

Post » Mon Aug 29, 2016 11:16 am

@Smileh This shader effect is not related to bounded or unbounded scrolling. It's a fullscreen effect, whatever is on screen.

Here is a simple Capx to show you how it works.:
https://dl.dropboxusercontent.com/u/13847313/Scirra/ShakeCamExample.capx

You will see a ShakeEffect layer. You can use a layer like this for all your fullscreen fx.
In order to affect all the other layers behind this one, I use a trick. I include as first shader fx on it a NoiseMask (set at 0). After this one, you can add the fullscreen shaders you want.
The important thing to know is to be sure you have at least ONE object (whatever it is) on this layer. (or the shader won't be applied)

I hope it will help. I'm not good at explaining things. ^^
B
72
S
21
G
12
Posts: 314
Reputation: 12,116

Post » Mon Aug 29, 2016 11:56 am

KaMiZoTo wrote:@Smileh This shader effect is not related to bounded or unbounded scrolling. It's a fullscreen effect, whatever is on screen.

Here is a simple Capx to show you how it works.:
https://dl.dropboxusercontent.com/u/13847313/Scirra/ShakeCamExample.capx

You will see a ShakeEffect layer. You can use a layer like this for all your fullscreen fx.
In order to affect all the other layers behind this one, I use a trick. I include as first shader fx on it a NoiseMask (set at 0). After this one, you can add the fullscreen shaders you want.
The important thing to know is to be sure you have at least ONE object (whatever it is) on this layer. (or the shader won't be applied)

I hope it will help. I'm not good at explaining things. ^^


Something might be real wrong because that capx is not even working for me. Spacebar ain't working for the shake. Tried switching to another key or trigger by a different event, just not working or my browser is real bugged. Not sure
B
14
S
5
Posts: 248
Reputation: 1,705

Post » Mon Aug 29, 2016 12:02 pm

Nevermind. Just figgured out it was Chrome. Tried on Edge and works. That explains why I couldn't make it work yesterday either. I was starting to think that I was dumb as a rock and it was my browser lol

@Kamizoto Btw I apply it to the layout not the layer and I don't have to use the noisemask trick. I guess you doing it on a layer because it causes some trouble to have it applie to the whole layout in your game? Would love to understand the reasoning why not applying to layout.
B
14
S
5
Posts: 248
Reputation: 1,705

Post » Mon Aug 29, 2016 12:28 pm

@smileh I use a layer because I don't want my fullscreen fx to affect the HUD for example. :)
B
72
S
21
G
12
Posts: 314
Reputation: 12,116

Post » Mon Aug 29, 2016 1:20 pm

KaMiZoTo wrote:@smileh I use a layer because I don't want my fullscreen fx to affect the HUD for example. :)
Yeah that's what I figured hehe makes total sense. I haven't set up my HUD so that's why maybe I didn't rethink it :P

Thanks for the help!
B
14
S
5
Posts: 248
Reputation: 1,705

Post » Mon Aug 29, 2016 10:36 pm

Good thing you got it sorted, because I can't even remember how I did that, lol =P
B
33
S
9
G
1
Posts: 156
Reputation: 3,034

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests