Daggerfall Mod:DFRemake/Resource - RMGet3dObject

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

integer RMGetObject ( DWORD ObjectValue )[edit]

Inputs[edit]

  • ObjectValue: The object value (from the Arch3d directory) that you wish to load/access.

Outputs[edit]

Returns 1 on success and the global RMObjects() list is set to the given object. On failure 0 is returned and the RMObjects() list is set to the NULL object.

Description[edit]

This function accesses, or loads, the specified object, setting the RMObjects() list to the given object. If the object currently exists in the cache, it is merely accessed. If it doesn't exist, the object is loaded and added to the cache. If the object cannot be loaded the RMObjects() list is set to the NULL object to ensure a valid object is available.

New objects are hidden and moved far from the origin (negative direction). The intent is to never use the copy of the object in the cache, but instead to make instances and copies of the object and place them into the world as needed.

Notes[edit]

Need rough access times...

Example[edit]

  Local Result as integer

  Result = RMGetObject(456)
  if (not Result) then End

  print "Object 456 found using ID #", RMObjects().ObjectID