entity - a valid entity handle |
Returns a string containing the class of the specified entity. Possible return values are: Pivot Light Camera Mirror Listener Sprite Terrain Plane Mesh MD2 BSP Note that the command will fail if a valid entity handle is not supplied, and will not just return an empty string. |
; dxEntityClass Example ; ------------------- dxGraphics3D 640,480,16 dxSetBuffer dxBackBuffer() dxSeedRnd MilliSecs() ; Select a random number between 0 and 7 then create a certain class of entity depending on the number selected i=dxRand(0,7) Select i Case 0 ent=dxCreatePivot() Case 1 ent=dxCreateLight() Case 2 ent=dxCreateCamera() Case 3 ent=CreateMirror() Case 4 ent=dxCreateSprite() Case 5 ent=dxCreateTerrain(32) Case 6 ent=dxCreatePlane() Case 7 ent=dxCreateMesh() ;Case 8 ent=CreateListener(parent) ;Case 9 ent=LoadMD2(md2_file$) ;Case 10 ent=LoadBSP(bsp_file$) End Select ; Get the class of the entity class$=dxEntityClass$(ent) ; Output the class to the screen dxText 0,0,"A "+class$+" was created." dxText 0,20,"Press a key." dxWaitKey() End |