How do I make a sprite visible once in forever in another la

  • Dear all,

    I need help to make a sprite visible in 2nd layout when I click a sprite on 1st Layout (FOREVER).

    In detail: Let's say I have a sprite 1 in Layout 1 and the sprite 1 is not visible. When I click something in the Layout 2, the sprite 1 in the Layout 1 should be visible forever.

    What I have tried: I have made On start of layout 1: Set sprite 1 not visible. And in Layout 2, on collision make the sprite 1 visible. But again when opening the layout 1 the sprite 1 goes invisible. I understands that on start of layout does not works, but any other option.

    Help needed!!!

  • here's one option:

  • Thanks That's simple and easy one.

    What if I have multiple sprites in the Layout 1 which has to be unlocked from other layouts 2, 3, 4, 5.... Let's say like a levels page. Is it advisable to add maore Global Variables

  • It probably would be better to make the objects global and use (boolean) instance variables in that case, for global variables would clutter things up..

    It all depends on how your game is set up..

    Using an (global) array to hold all the (visibility) values would be another option..

    Also if you wanted to create a level-unlock-thingie, there are multiple examples in the forum and one or two tutorials in the tutorial section..

    It would involve adding to the global variable and checking if level number is less than or equal to that variable, I guess..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • THanks LittleStain but I am not that bright logically to get everything you said. I am gonna post another question maybe here itself with another capx, which I guess will help me much more easily.

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