**On Touch Pressed, Send to Front?**

ShineHouseGamesShineHouseGames Member, PRO Posts: 100
Is that doable? Couldn't seem to find that formatting within the self.attributes.

Any way for an actor to be above another actor when dragged, but behind when released? This is probably very simple..?

Comments

  • PixelPunPixelPun Member Posts: 324
    I'm like 99% sure that it cannot be done. The actor is going to stay in the layer position it is in always.

    I am bad at helping.. but I'm going to try...

    You could create 2 versions of the actor one in the top layer and another behind it like you want. Then constrain the position of the actors together so that when they move, they move in unison. Now to give the illusion of moving to the top layer you can set the alpha to zero on the top layer actor when touch is not pressed (this will make it invisible), then set the alpha of the top actor to 1 (makes it visible) when touch is pressed. This can be done through the actors self.interpolate color options.... That should get the look you are going for.

    Hopefully this helps a little.
  • ShineHouseGamesShineHouseGames Member, PRO Posts: 100
    I suppose thats a sufficient workaround. Shame though... Thought this would've been a simple solution.
  • PixelPunPixelPun Member Posts: 324
    Yeah... I could be wrong.. there are people on here that do amazing things that I would have no idea how to do, but I'm pretty sure layer stuff is fixed when the game is going.
  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    agreed... don't think there's a better way...
  • mc99093mc99093 Member, PRO Posts: 133
    Here is a video tutorial to do what PixelPun is referring to.

Sign In or Register to comment.