How to move object to top layer?

0 favourites
  • 5 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Sorry if this was asked before, I searched and couldn't find it.

    Is it possible to move an object to the top layer (regardless of how many layers are on the layout)? Not to top of its current layer, but to the top of the top layer.

    Thanks.

  • Name your top layer "Top Layer" or whatever.

    On event: move object to layer "Top Layer". (There's an action 'move to layer')

    I think it automatically goes to the top.

  • Thanks sqiddster. I did think of that. This is the workaround I will implement unless someone has another suggestion?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • you can always keep a global variable with the name or number of your top layer and use it instead of hard coding.

    I guess that if you're asking that, you might have many object that needs to switch to this layer and don't want to change the events every time you change your layer structure.

    That's the only issue I see about not having a system variable or way to find it out.

    So yeah, I would use a global variable.

  • Thanks Yann. I ended up using a similar workaround. Would be nice to have a system way to find out, something like "numberOfLayers" would be great <img src="smileys/smiley1.gif" border="0" align="middle" />

    Cheers!

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