The Phantom Menace(UID)

This forum is currently in read-only mode.
From the Asset Store
Phantom XXIV Plane game sprites for side scrolling action adventure endless runner 2D mobile game
  • 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.

    http://dl.dropbox.com/u/666516/ghostinthecap.cap

    So my question is what is this extra object?

    The container?

    The click?

    Ok probably not the click.

  • The third object created is the Sprite's "drag and drop" behavior.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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)

    Thanks!

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