How do I shake screen except for 1 sprite? [Solved]

0 favourites
  • 3 posts
From the Asset Store
Is a circular loading screen with code ready to use. No Animation.
  • I would like for the background layer to shake for a second while the image on the foreground layer doesn't. Right now I'm using the ScrollTo behavior on an invisible sprite centered on the layout, and that's working out great for the screen shake, but I can't figure out how to exclude the foreground image from it. Any ideas?

    Tagged:

  • you can put the foreground on a separate layer and set the parallax settings for that layer to 0,0

    however that will cause trouble if the foreground it supposed to scroll as you move around the layout.

    Edit: the title says "except for 1 sprite", so I guess you could move that 1 sprite to a layer reserved for not shaking. So, just before you start the shake, you would have to move the sprite to that layer, but to get it to the correct place on the screen you would have to use layerToCanvasX (and Y) from the normal layer, then canvasToLayerX (and Y) to get to the reserved layer. and then reverse that after the shake...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That works! Thank you for your help.

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