Osiris/API/GetSurfaceTypeIndex

From Divinity Engine Wiki
Revision as of 21:46, 22 February 2018 by Tinkerer (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Full Definition(s)
  • query GetSurfaceTypeIndex([in](STRING)_Surface, [out](INTEGER)_Index)
Description

Returns the _Index of a _Surface in the internal numbered list of surface types.

Return Values
  • Success/Failure: Never fails.
  • _Index: The index of a surface. Returns -1 if the _Surface does not exist, or if there is no surface.
Notes
  • This call is mainly useful if you need to handle surfaces in behaviour script and Osiris simultaneously - the SURFACE type in behaviour script can be converted to an integer with this call and then set with SetVarInteger.
  • The surface types page lists the surfaces in the same order as they exist in the internal list, starting at -1 for SurfaceNone.
See Also