"Visible" Objects Appearing Invisible

0 favourites
  • 3 posts
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • My apologies if the topic heading is confusing. The issue I'm having is, indeed, confusing. I don't think I've encountered this EVER before.

    I'm working on a 2D side-scroller.

    I have three groups of layers - A, B, and C - that make up three layers of rooms - back, middle, and front.

    Each group is made up of four layers, themselves...

    • Background - force own texture (true), transparent (no)
    • Main - where the main character exists
    • Lighting - for all light-based objects (blend mode Destination out)
    • Foreground

    Up to this point, everything works and appears as it should.

    I've successfully made it so my main character, Mr. Spy, moves between the layer groups just fine.

    When switching between layers, if Mr. Spy goes back a layer group (such as from C to B ), then the layer closest to the player's vision is turned invisible (if moving from B to C, layer groups A and B are invisible), thus making the non-transparency and texture forcing a non-issue.

    So far, for testing purposes, I have a HangingLight object with a light cone in the B layer group only (on the Layer B Lighting layer). Going through either pair of doors - that lead one to Layer Group A or one to Layer Group C - is fine. But when moving BACK TO Layer Group B, where the lights are, the lights are in effect, and yet they cannot be VISIBLY seen like when you first run the game. Meaning, you can see the EFFECT of the light cone making anything overlapping the light object more visible, just like normal light, but you can't actually see the white transparency of the light object, itself.

    I am at a complete loss as to why this is.

    CONTROLS: Arrow keys to move, A on a door to open


  • When you jump around in layers like that are you also making sure objects that are on top and bottom stay in the right order?

    That would be my guess.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Everything is assigned to a layer and the only object jumping layers is the MrSpy object. So nothing else should be changing.

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