3D_LOAD_OBJECT

3D_LOAD_OBJECT N,F

PROVIDES THE 3D OBJECT NUMBER N WITH THE STRUCTURE DESCRIBED IN THE FILE F

  • Type: Command
  • Parameters: 2
  • Group: 3D Objects

ACTION

The command 3D_LOAD_OBJECT N,F assigns a structure to an existing 3D object.

The structure is in the file F.

The file must be in format MD2 or 3DS (common used formats for 3D object).

SYNTAX: 3D_LOAD_OBJECT N,F

  • N = 3D object number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of 3D objects.
  • F = (absolute or relative) name of the file containing the structure

USE

  • The command is used to load a structure (format MD2 or 3DS) in a 3D_MESH (format 3DS) or in a 3D_ACTOR (format MD2).

ERROR

  • If number N is not a correct expression.
  • If number N exceeds the allowed maximum number of 3D objects.
  • If number N is not greater than 0.
  • If the 3D object number N does not exist.
  • If number N is not the number of a 3D_ACTOR or of a 3D_MESH.
  • If F is not a correct string expression.
  • If file F does not exist.

EXAMPLE

rem create a 3D world

scene3d 1

rem create a mesh object (3D_mesh)

3d_mesh 1

rem load a file in the mesh object

3d_load_object 1,"house.3ds"

SEE ALSO

3D_LOAD_TEXTURE

3D_MESH

3D_ACTOR