Object ID and Unique ID?

For questions about using Classic.

Post » Fri Aug 03, 2012 3:06 pm

What is the difference between an Object ID and a Unique ID? When should you use one instead of the other? I've been trying to search the forums for this, but if the answer is here, it's probably buried deep.
Posts: 27
Reputation: 404

Post » Fri Aug 03, 2012 3:38 pm

Oid is based on the Object type, while uid is based on the Unique instance.
You should probably stay away from both, unless you're storing uid in variables.
Image Image
Posts: 7,234
Reputation: 61,496

Post » Sat Aug 04, 2012 4:46 am

I see. So the Object ID points to the template from which all other instances of that object or template are created. The Unique ID points to an instance of the template and is unique across all instances of any template. Instances of the same object will all have the same Object ID, but everything in the game has its own Unique ID.

Also, it seems that you can reliably "Create Object By Name" and pass an Object ID instead of an object's name. Passing a Unique ID to "Create Object By Name" will not always work.

I'm aware that OIDs and UIDs are only reliable at runtime and may not have the same values across different runs.

Thanks, newt.Elyzius2012-08-04 04:47:36
Posts: 27
Reputation: 404

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests