From Divinity Engine Wiki
- query GetSurfaceNameByTypeIndex([in](INTEGER)_SurfaceIndex, [out](STRING)_SurfaceName)
Returns the name of the surface that has the index _SurfaceIndex in the internal numbered list of surface types as _SurfaceName.
- Success/Failure: Does not fail.
- _SurfaceName: The name of the surface.
- 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 -1 for SurfaceNone.