Make sprites partially visible OR check for background color?

1 favourites
  • 3 posts
From the Asset Store
Creepy Sprite Font suitable font for your Dark/Horror/Halloween games.
  • Hello there!

    I'm still figuring out how to make a proper slide menu. Currently I'm trying to find the best way to only show a small area from all the objects of the slide menu.

    The rectangle is the visible area of the slide menu. Inside this rectangle the overlapping (blue) parts of the circles should be visible. The circles are the individual menu objects.

    Every (red) part of the circles who are not inside this rectangle should be hidden.

    I tried to achieve this by just using a sprite with the same color as the background which is placed on top and bottom of the rectangle area. So this sprite just overlaps the parts of the circles that should be hidden with the backgrounds color. The problem is that I do not know how I can set this "HideArea"-Objects color the same as the backgrounds color. How can I check the background color in runtime?

    Or is there a more elegant way to achieve this? Like make a sprite invisible and just make the rectangle overlapping part of it visible?

    Note: There are other objects outside the rectangle that must still be visible.

    Thanks in advance! :)

  • If you can't just cover the invisible parts with blocks, then the next best option is to mask them with a blend mode. Check out Blend Modes template in C3.

    Here is a simple demo:

    dropbox.com/s/8fqm5p6ldg2qhsr/ScrollingMenu.c3p

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I could indeed just cover the parts with blocks. That would have way less impact on the performance, I guess. But I would need a way to check the background color on runtime. Is there a way to do so?

    Thanks for the demo. I need to learn more about these blend modes.

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