Types

Blitz3D Forums/Blitz3D Beginners Area/Types

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Yeah basically in the same way as variables can be used as OBJECT handles for 3D models:

Mesh=LoadMesh("Mesh.X")


So can Type fields be used for these variables. In order to save memory, instead of LOADING a mesh each time, convention dictates that usually a master mesh model is COPIED each time....


Type Models
Field ObjectMesh
EndType

PlaceCOPY.Models = New Models
PlaceCOPY\ObjectMesh=CopyEntity(Mesh)
PoitionEntity PlaceCOPY\ObjectMesh,x,y,z

Hope that makes sense!

In short, the answer to BOTH your questions is YES!