[r184] editor z index iid bug

0 favourites
  • 5 posts
From the Asset Store
Supports 1D, 2D, 3D arrays. Import and export arrays in JSON format
  • Problem Description

    Changing z order in the editor changes the iid of an instance.

    Attach a Capx

    [attachment=0:1tgk80m6][/attachment:1tgk80m6]

    Description of Capx

    Shows that iid is changed with z order

    Steps to Reproduce Bug

    • Step 1: Run preview, note text on instances
    • Step 2: Click middle instance in editor, send to bottom
    • Step 3: Run preview again. Observed Result Iid of changed z order instance is changed Expected Result Iid should not change until one is destroyed Affected Browsers
      • Chrome: (YES)
      • FireFox: (YES)
      • Internet Explorer: (YES) Operating System and Service Pack 764 Construct 2 Version ID 184 Edit: It seems that runtime changes to zorder are not affected.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Closing as won't fix. IIDs are not constant and should not be relied on like that. Use UIDs instead.

  • But why should changing the z change the iid?

  • Because the initial objects placed in the layout happen to be created in order of their Z order. You shouldn't rely on what order the editor happens to assign IIDs, they swap and change even at runtime as objects create and destroy; UIDs are there to be permanent references.

  • The runtime change is quite exploitable for instances, as long as the change is predictable.

    Uid on the other hand, is not.

    Well at least keep it in mind for C3 please.

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