How do I get the IID?

0 favourites
  • 2 posts
  • ... ckup1?dl=0

    How do I get the instance id? I used the manual and I know inst.get_iid() is what gets it but WHERE do I put it?

    The basic concept is that I choose which platform will be visible. What I need to do is grab the IID of the most recently created platform, compare it to the random choice of which platform that will be visible (1 or 2) and make it visible. I just have no idea WHERE to put the inst.get_iid() because there is no 'get' option under system that i'm aware of.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That function is for the SDK for if you are building your own plugin in javascript.

    I'm assuming that is not what you are doing. What you should be using is UID, which you can get from object.uid. This can be stored in an array or variable when you create the object (pushing it to an array will give you the order each one is created in as well).

    Otherwise, the shortcut to use IID is to reference the newest instance of an object in an expression by object(-1).expression.

    You generally never need to know to know what the IID of any specific object is, as it can change as objects are destroyed.

    So IID basically is a way to get relative order for expressions - first, second, third, last, next to last, ect. UID useful to pick a specific instance of an object.

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