Daggerfall Mod:DFRemake/Resource - RMGetFreeMeshID

The UESPWiki – Your source for The Elder Scrolls since 1995
Jump to: navigation, search

DWORD RMGetFreeMeshID ( )[edit]

Inputs[edit]

None

Outputs[edit]

Returns the next available mesh ID. The ID is guaranteed to be valid and not currently in use.

Description[edit]

Use this function to obtain a free mesh ID used for mesh creation.

Notes[edit]

The only way this function can fail to return a valid mesh ID is if all IDs are currently in use. Since mesh IDs range from 1000 to 1 million, this is unlikely to occur. Mesh IDs returned by this function start at 1000 leaving the lower IDs available for special purposes.

Example[edit]

  Local NewID as DWORD

  NewID = RMGetFreeMeshID()
  Load Mesh "somefile.x", NewID