Screen shake help

0 favourites
  • 6 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hi C2'ers,

    I wanted to introduce a screen shake to my game, but have hit a problem. I've tried using the shake feature of the ScrollTo behaviour, but unfortunately this doesn't seem to have worked for me.

    I'm guessing that it's because my layout is the same size as my window, so it's a set size and does not scroll (so there's no where to "ScrollTo").

    Can anyone offer some advice on another way I could achieve this, given the restrictions mentioned above.

    Thanks for any help or advice you can offer.

    <img src="smileys/smiley1.gif" border="0" align="middle" />

  • You can turn on 'unbounded scrolling' on the layout, make the background a bit bigger than the layout, put an invisible object in the middle of the screen with 'ScrollTo' behavior and call the shake action on that.

  • Hi ramones,

    Thanks for the information, it was very useful. I gave it a a try and it works, fantastic!

    <img src="smileys/smiley4.gif" border="0" align="middle" />

  • ramones

    Great info, very helpful!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks, this post really helped.

  • This is great

    Except for: "....and call the shake action on that".

    i don't know what to do on this point - i simply don't understand it 100%:

    what i maybe understand is, that i need to to call "it" (exactly what?) on the action, which defines the shake?? (which i already defined)

    =>> okay, i found it out myself. just as you said. just define the action on the event you defined for shaking (select the object with the scrollTo Behaviour and you'll see it ^^)

    but now i have another problem: i center the image with scrollTo... but now my whole images aren't centered -> they are moved

    and the solution: as i though, i just centered the image the wrong way (it wasn't centered at all) ;D

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)