ent_status(ENTITY*, var mode);

A7.62 Returns status information about the entity.

Parameters:

ENTITY* - Entity pointer.
mode - Information to return:
  0 - number of unique xyz vertices of model or terrain meshes (this number is displayed in MED).
  1 - total number of mesh vertices, including duplicated vertices with the same xyz position, but different skins or uv positions.
  2 - number of terrain mesh squares in x direction. This is one less than the number of vertices in x direction, and should be a multiple of terrain_chunk.
  3 - number of terrain mesh squares in y direction. This is one less than the number of vertices in y direction, and should be a multiple of terrain_chunk.
  4 - number of triangles of the main mesh.
  5 - number of triangles of the 1st internal LOD mesh.
  6 - number of triangles of the 2nd internal LOD mesh.
  7 - number of triangles of the 3rd internal LOD mesh.
  8 - total number of model skins.
  9 - number of mesh subsets (parts of the mesh with different skins).
 10 - number of skins per subset (>1 when normal or height maps are used).
 12 - number of model or sprite animation frames.
 14 - number of bones.
 16 - number of terrain chunks or map entity blocks.
 20 - number of internal lod meshes.
  22 - size of a mesh vertex, in bytes. A7.82

Returns:

Status information dependent on mode.

Remarks:

Speed:

Fast

Example:

x_vertices = ent_status(ent_terrain,2);
y_vertices = ent_status(ent_terrain,3);

See also:

ent_type, ent_getmesh

► latest version online