Edit UID/IID?

0 favourites
  • 4 posts
  • I created a bunch of copies of a base object at design time, but I just sort of assembled them without thought of what order they were in... there are 57 of these and I need them positioned specifically at design time vs. runtime.

    But at some point, I want to be able to loop through them in order and I assume this is done by the UID/IID?

    So my question is can I edit the UID or Instance ID of these items to make them sequential in the order I want them to be processed in? Sort of like a tabindex for an HTML form.

    Thanks!

  • Whilst I'm not sure about the whole idea of changing their UID/ID's, you could do a workaround!

    Have an instance variable for the object (e.g "AnotherID"), and do a "Start of Layout" and "ForEach(ordered)" loop (This will pick each object starting with the lower/highest value given, so you could specify the object's X position and it will pick from left to right in order) and in this loop, set the object's "AnotherID" to loopindex. Now you'd have each object with an ordered ID!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the lead.. I guess I should have looked at the ForEach(ordered) criteria, I just assumed it processed them in IID order, not that I could specify.

    I just put an instance variable called ProcessOrder and manually set them. These objects don't move, so the order of processing is set in the game design.

    Awesome, thanks!

  • You could also arrange their z-order, and "For Each" by that order.

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