Osiris/API/GetSurfaceNameByTypeIndex: Difference between revisions

From Divinity Engine Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 4: Line 4:
Returns the name of the surface that has the index '''_SurfaceIndex''' in the internal numbered list of surface types as '''_SurfaceName'''.
Returns the name of the surface that has the index '''_SurfaceIndex''' in the internal numbered list of surface types as '''_SurfaceName'''.
===== Return Values =====
===== Return Values =====
* '''Success/Failure''': Fails if the _Target is outside the AIgrid.
* '''Success/Failure''': Fails if there is no surface with such an index.
* '''_SurfaceName''': The name of the surface.
* '''_SurfaceName''': The name of the surface.
===== Notes =====
===== Notes =====

Revision as of 14:08, 20 December 2017

Full Definition(s)
  • query GetSurfaceNameByTypeIndex([in](INTEGER)_SurfaceIndex, [out](STRING)_SurfaceName)
Description

Returns the name of the surface that has the index _SurfaceIndex in the internal numbered list of surface types as _SurfaceName.

Return Values
  • Success/Failure: Fails if there is no surface with such an index.
  • _SurfaceName: The name of the 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 queried with GetVarInteger and then converted to the strings used in Osiris with this call.
  • The surface types page lists the surfaces in the same order as they exist in the internal list, starting at 0 for SurfaceNone.
See Also