DWORD RMGetFreeObjectID ( )Edit
InputsEdit
None
OutputsEdit
Returns the next available object ID. The ID is guaranteed to be valid and not currently in use.
DescriptionEdit
Use this function to obtain a free object ID used for object creation.
NotesEdit
The only way this function can fail to return a valid object ID is if all IDs are currently in use. Since object IDs range from 1000 to 1 million, this is unlikely to occur. Object IDs returned by this function start at 1000 leaving the lower IDs available for special purposes. IDs are limited to 1 million since large object IDs seem to require too much memory and slow down the system.
Typical access time for this function is < 0.004 ms for the first 999,000 objects created.
ExampleEdit
Local NewID as DWORD NewID = RMGetFreeObjectID() make object box NewID, 10, 10, 10