How do I make a part of app not move when scrolled up , down

0 favourites
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • No worries

    Place the objects that you don't want to scroll on a separate layer. In the settings for that layer set the parallax to 0,0.

    For example, in the demo capx I placed the "Layer 1" text on layer 1 and set the layer 1 parallax to 0,0).

  • when i create a new layer , and set the parallax to 0, 0 , nothing scrolls .

  • I'm not sure why that would be, as long as the layer you want to scroll is still set to parallax (100,100). Just to confirm, you're setting the parallax in the layer properties rather than using an action? If so pm me the capx and I'll take a look.

  • Yes , I am setting the parallax at the layer properties , is that a problem ?

  • No, that's fine, it must be something else that's causing the issue.

  • I am such an idiot , I was setting the parallax to 0, 0 of the wrong layer. I am really so sorry but now how can i make it to not touch the layer which I don't want to be scrolled . THANK YOU SO MUCH , ANYWAY , I TRULLY LITERALY LOVE YOU. NO HOMO

  • You're welcome

    Do you want avoid triggering an object that is on the top layer if you swipe across it whilst scrolling ? If so, this may work (although there could well be a more straightforward solution):

    Add all the objects on the non-scrolling layer to a family .

    Add a global variable "isScroll" set to 0.

    On touch start:

    if is NOT touching family: set isScroll to 1.

    On touch family:

    if isScroll = 0

    if object A do X

    if object B do Y etc

    On touch end: set isScroll to 0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • can you please make a file so I can show how to code on touch start , i just started learning construct 2 .

  • I've updated the demo:

    https://www.dropbox.com/s/7in3nja83t3oy ... .capx?dl=0

    If you click first on the scrolling layer and drag you can drag over the HUD without triggering it.

    If you click first on the HUD it will register the input, and you can drag without moving the scrolling layer.

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