From ZDoom Wiki
bool UniqueTID ([int tid[, int limit]])
Returns a new TID that is not currently used by any actors.
- tid: Starting value from which to check. It has two modes of operation:
- If tid is non-zero, then it checks TIDs one-by-one starting at the given tid until it finds a free one.
- If tid is zero, then it returns a completely random TID.
- limit: 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.
0 if no free TID is found, a positive value corresponding to an unused TID otherwise.
|Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please. This will make it easier to understand for future authors seeking assistance. Your contibutions are greatly appreciated.|