Set Z-index

0 favourites
  • 11 posts
From the Asset Store
Create large maps with dynamic depth and precise sprite layering control in top-down games.
  • Hello,

    Ashley

    currently there are only "bring to top/bottom" actions, but it's not possible to set a specific Z-index on runtime. Actually, it's a very crucial (basic) feature and it surprises me that it is missing.

  • There's a "move to object", with option to place in front or behind another item.

  • I know, but it is something different. In this case in order to set a specific Z-index, I have to remember what object it was infront of, but if the object was destroyed on runtime - it's very inconvinient this way and there are a lot of edge cases. Picking/comparing objects within one family is also problematic.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yea, I agree, this would be a useful feature.

  • there should be dynamic z-indexing which i am missing.

    example - you have a house. when you character is behind the house - set the index to be behind the house, but when > 50% of Y (you get in front of the house) then set the index to be infront of the house.

    it would help with 2.5D games / isometric.

    also i hate how you have to change that all the time - example - i set that my mines for example have index 1

    and then i create a character with index 2. but if i again create a mine - she doesn't have default index 1, gets index 3 and is above both of the last objects which makes it wtf. i would recommend that you add a "default zindex" property Ashley (thnx)

  • I think the best approach would be to have a "sort Z indices by instance variable" action. I don't think dealing with Z indices themselves is very intuitive because they depend on how many objects are underneath (creating and destroying instances changes the Z index of everything above it). Then you can just have a number which does not have to be incrementing or any particular number at all, just something to sort it relative to other objects.

  • I agree that there shoud be z-index option by default, and I hope c3 will include that feature, however you still can do it efficiently with events, sorted by Y axis. You can narrow it down to specyfic objects. You can make it a function that you call every time you need to z-order everything.

  • Ashley - i agree about the sorting problem because you can't determine how many objects is nested under each object and so on.. but at least give us a "default" z-index on each instance, this shouldn't be hard (i presume) to implement and it could hit next stable. thnx

  • There is a REX plugin that allows you to configure the Z but I don't remember the name of the plugin

  • i'm also having the same issue! I'm looking for the REX plugin, will update when I find something

  • This thread is 4 years old and is completely out of date now. Just use the system 'Sort Z order' action.

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