Is there any attribute to change the order of the actors in a layer?

For example when actor hero self.position y<=332 change attribute wall in front of actor hero,thanks

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    edited October 2014

    You can do this by having two actors, one on an upper layer and one on a lower layer . . . and switch their opacity on and off.

    So . . . . first the layer sandwich:

    Wall 1

    Hero

    Wall 2

    And the logic . . . .

    Wall 1: When actor hero self.position y<=332

    Change alpha to 1

    Otherwise: Change alpha to 0

    Wall 2: When actor hero self.position y<=332

    Change alpha to 0

    Otherwise: Change alpha to 1

  • agueisagueis Member Posts: 420

    Thanks Socks, what i want to do is impossible to do it in gamesalad, yes you´re rule works, but the problem is : that there are 2 actors that need this rule and when the first actor goes to the position 332 the second actor have to go to that position after 3 seconds, so the first actor change the order of the layers and then the layers are wrong for the second actor

  • SocksSocks London, UK.Member Posts: 12,822
    edited October 2014

    @agueis said:
    Thanks Socks, what i want to do is impossible to do it in gamesalad, yes you´re rule works, but the problem is . . . .

    The obvious question would be if you think it's impossible why would you even be pursuing the idea ? :)

    @agueis said:
    . . . the problem is that there are 2 actors that need this rule and when the first actor goes to the position 332 the second actor have to go to that position after 3 seconds, so the first actor change the order of the layers and then the layers are wrong for the second actor

    Then apply the rule to the actors and not the walls ! You don't have to limit yourself to only changing the opacity of the walls, use the same logic to changes the opacity of the walls or the actor or both or 6 sets of walls and 92 pairs of actors or anything you want ! . . . basically with a little applied logic this method can be used to do all a sorts of visual layering, but you need to adapt it to your own needs, I am only showing you the basic idea.

  • agueisagueis Member Posts: 420

    Thanks very much , good ideas

  • SocksSocks London, UK.Member Posts: 12,822
    edited October 2014

    ...

Sign In or Register to comment.