<aside> ⚡ script "core_uniquetid" (int start, int limit)
</aside>
This script is a wrapper for UniqueTID
which will dodge any TIDs which have already been reserved for long term use by [DefineReservedTID](<https://mm8bdm.notion.site/DefineReservedTID-0ab6254422214b33a2c08eb5d27bb87b>)
and [DefineReservedTIDRange](<https://mm8bdm.notion.site/DefineReservedTIDRange-187671d514a64498a028099e806b862f>)
.
<aside> 🚨 **This script can be a bit intensive when spammed, so for best practices, this should only be used for TIDs which need to exist for longer than 1 tic, be created relatively infrequently, but still need to be guaranteed unique.
If this is not the case, you may want to consider using [core_NewUniqueTID](<https://mm8bdm.notion.site/core_NewUniqueTID-042826a8255e44cd906755cd5f6aed1a>)
instead!**
</aside>
start
: int - Starting value from which to check. If non-zero, then it checks TIDs one-by-one, starting here until it finds a free one. If zero, then it returns a completely random TID.limit
: int - Specifies the number of attempts to make to find a free TID. If limit
is non-zero, then it will only check that many times for a free TID, so it might not find a free one. If no free TID is found, 0 is returned. If limit
is zero, then the search is effectively unlimited.Returns a unique TID which can be used long term.