Shake an object...

Get help using Construct 2

Post » Wed Jan 08, 2014 11:15 pm

Hey friends,

today I played around with the Pseudo-3D behaviour a bit.

Now I want an object to shake a little when I press a key. I searched the forum and found the scroll to behaviour, but when I use it on the object and set up the event, nothing happens.
I guess its the wrong for my purpose.

maybe someone of you has an answer...

Have a great one,
Beav
Image
Check out our start-up and configure your own helmet in true 3D.
B
45
S
12
G
11
Posts: 1,154
Reputation: 10,093

Post » Thu Jan 09, 2014 4:33 am

I don't have much experience with that function, but I seem to remember something about needing either "unbounded scrolling" on, or be scrolled away from the edges out into a larger layout. If it's against a locked edge, it can't move (jiggle) the screen past it or something.
B
242
S
63
G
33
Posts: 903
Reputation: 40,756

Post » Thu Jan 09, 2014 5:12 am

I made a shake function for my latest game that I'm working on. The function uses the LiteTween behaviour to do the movement. You'l need to install that to see my example.

Here's the CAPXfunkyos2014-01-09 05:13:39
B
19
S
6
G
2
Posts: 57
Reputation: 2,534

Post » Thu Jan 09, 2014 8:58 am

I guess the scroll to behavior only works for the whole screen, doest it? I just want to add a little effect to one object...somehow like the flash behavior.

Also I cant set unbounded scrolling to on, cause it would destroy my whole layout :)

@funkyos
I dont have construct here at work, but Ill give it a go at home. :) Thank you!
Image
Check out our start-up and configure your own helmet in true 3D.
B
45
S
12
G
11
Posts: 1,154
Reputation: 10,093

Post » Thu Jan 09, 2014 9:59 am

use the sine behaviour with a very low magnitude (1 or 2 ?) and period (0.1 ?)then alter the wave shape to triangle. Activate sine on keypress else deactivate.

edit - just thought, the object could be slightly off from it's start point using this method (depending when you deactivate the sine) so you might need to store it's x,y and restore them after.RamPackWobble2014-01-09 10:02:37
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,892

Post » Thu Jan 09, 2014 11:02 am

Oh well, that sounds good too and it works without external Plug-Ins.
Will give that a go too!

Thank you guys!
Image
Check out our start-up and configure your own helmet in true 3D.
B
45
S
12
G
11
Posts: 1,154
Reputation: 10,093


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 4 guests