The Phantom Menace(UID)

This forum is currently in read-only mode.
From the Asset Store
The sounds of magic. Made with magic supernatural powers in sound design to bring you peak levels of mesmerizing magic.
  • I was looking over some recent threads about picking instances via UID, so I decided to see if there was some sort of pattern given to the uid when an object is created... and there is... sorta.

    It seems the UID is assigned the current total object count when the object is created... ok fine, but for some reason there seems to be some extra object created, or at least counted at the same time.

    Check the cap. On right click two objects are created on screen(sprite, and its container text), but the UID, and debugger says there's a third.

    So my question is what is this extra object?

    The container?

    The click?

    Ok probably not the click.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The third object created is the Sprite's "drag and drop" behavior.

  • Wow. Really didn't see that one. I mean there's no reference to it in the debugger.

    Alright so I guess I need to think of all plugins as objects, even if it is a behavior.

    That kinda complicates things since each sprite, etc. could have multiple behaviors.

    Rules out that idea.

    So I guess all you can do here is use system TotalObjects as a way of getting UID.

    But you would have to use the current count as the uid, before you create the object.. hehe

    set globalvalue (TotalObjects)

    create object.sprite

    -set sprite value (globalvalue)


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