[help] Object Orders..

This forum is currently in read-only mode.
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Hey

    So I'm (trying) doing a system where u have many objects from the same sprite every 15 X it spawn another one.. so at the end it's looks like this:

    <img src="http://2.bp.blogspot.com/_ciy4Wim5AoE/S-NZZj2SB4I/AAAAAAAAABs/xxiZ4Bqf_1o/s1600/Clipart_Casino_card_hand_hearts_266.jpg">

    now there is the problem.. I'm trying to make when you have the mouse over a object, it comes to front from the other ones and when not over the object, back to his previous order but I have no idea how to make it back to the exact previous order.. Tryed also make the object go to another layer when the mouse is over him and when not, go back to the previous layer, but when it comes back, they changes his order in relation to others.

    Any advice or tips?

  • Did you try storing the objects original layer as a variable, and setting the layer of the object to that variable when you stop mousing over it?

  • I'd suggest a for each object ordered by private variable ascending... send to front.

    If you give each new instance an increasingly higher number(via global pv switch) it will sort to the newest card on top. Descending to do the opposite.

    Then for the specific card do compare variable like pv = what you want, send to front

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'd suggest a for each object ordered by private variable ascending... send to front.

    If you give each new instance an increasingly higher number(via global pv switch) it will sort to the newest card on top. Descending to do the opposite.

    Then for the specific card do compare variable like pv = what you want, send to front

    Ya I think that would work, ill try it, thanks

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