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.
3 - number of terrain mesh squares in y direction.
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.
Returns:
Status information dependent on mode.
Remarks:
- If the information is not available for the entity type (such as vertices in x/y direction for non-terrain models), 0 is returned.
- For entities consisting of several meshes, such as chunked terrain, the vertex and triangle numbers are a sum over all meshes.
- This function replaces the ent_vertices, ent_skins, ent_bones, and ent_frames functions.
Speed:
FastExample:
x_vertices = ent_status(ent_terrain,2);
y_vertices = ent_status(ent_terrain,3);
See also:
ent_type, ent_getmesh
► latest
version online