FANDOM



This command will make a single mesh using the entire mesh data of an object.

Syntax
MAKE MESH FROM OBJECT Mesh Number, Object Number
MAKE MESH FROM OBJECT Mesh Number, Object Number, Ignore Mode
Parameters
Mesh Number

Integer
The mesh number Object Number Integer
The object number that this command will make a mesh from Ignore Mode Integer
If the ignore mode is set to one, the command will not copy over limbs that have their culling switched off

Returns

This command does not return a value.

Description

A mesh is a wireframe description of a 3D shape. The mesh and object numbers should be specified using integer values.

Example Code
sync on

sync rate 120

hide mouse

cls 0

ObjectNumber=1

MeshNumber=1

LimbNumber=0

TextureNumber=1

load mesh "mesh.x",MeshNumber

load mesh "newmesh.x",MeshNumber+1

load image "iron.jpg",TextureNumber

make object ObjectNumber, MeshNumber,TextureNumber

if mesh exist(MeshNumber)=1 then delete mesh MeshNumber

make mesh from object MeshNumber, ObjectNumber

add limb ObjectNumber,LimbNumber+1,MeshNumber

link limb ObjectNumber,0,LimbNumber+1

offset limb ObjectNumber,1,1,0,0

color limb ObjectNumber,LimbNumber+1,rgb(0,255,0)

scale limb ObjectNumber,LimbNumber+1,50,50,50

while mouseclick()=0

set cursor 0,0

print "press z key"

if inkey$()="z" then change mesh ObjectNumber, LimbNumber+1, MeshNumber+1

xrotate object ObjectNumber,wrapvalue(object angle x(ObjectNumber)+1)

sync

endwhile

delete object ObjectNumber

if mesh exist(MeshNumber)=1 then delete mesh MeshNumber

if mesh exist(MeshNumber+1)=1 then delete mesh MeshNumber+1

end
Community content is available under CC-BY-SA unless otherwise noted.