duplicating...?

Blitz3D Forums/Blitz3D Beginners Area/duplicating...?

po(Posted 2005) [#1]
I have a 3D mesh that needs to be duplicated and randomly placed everywhere. Like this:
For i = 1 To 20
	sphere = CreateSphere()	
	PositionEntity sphere,Rand(-20,20),Rand(-20,20),Rand(-20,20)
Next

My only problem is I want to do that without having to load the model I made every time. Is there a way to avoid doing this:
For i = 1 To 20
	model = LoadMesh("model.3ds")	
	PositionEntity model,Rand(-20,20),Rand(-20,20),Rand(-20,20)
Next

Sorry if I didn't explain it very well.
-Thanks


DJWoodgate(Posted 2005) [#2]
For i = 1 To 20
if i=1 model = LoadMesh("model.3ds") Else model=copyentity(model)
PositionEntity model,Rand(-20,20),Rand(-20,20),Rand(-20,20)
Next


po(Posted 2005) [#3]
Oh, didn't know there was a CopyEntity command.
Thanks.