IID did not work in R108.2

  • There are some problems in IID of sprite in R108.2

    Reproduced steps

    1. Add global number: index

    2. Add button in canvas, add sprite in canvas

    3. Add text in canvas.

    4. Add action in button onclick event:

        a. Create new sprite object with x = 100+ 25*index

        b. set text = sprite.IID.

    Expectation:

        text.text automatically increase from 0 to number of sprite object - 1.

    Fact:

        text.text always = 0

    Actually this problem never appear in R95.

    I hope this problem could be fixed as soon as possible.

    So sorry about my English.

  • You can do the achieve the same expected result with

    set text to Sprite.count-1

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • We won't fix this - it relates to the breaking change a while ago that created instances don't really exist until the next top-level event. So the IIDs won't be correct until then either. Like Yann says just use the count minus one if that's what you really want; you shouldn't really rely on any particular order of IIDs anyway, it could change again in future engine updates.

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