Hi,
the code below gives an error. The only question I have is: how do I pass the "tree" entity to the function placeTrees so it can be used inside that function?
Thank you.
the code below gives an error. The only question I have is: how do I pass the "tree" entity to the function placeTrees so it can be used inside that function?
Thank you.
Graphics3D 800,600,32,0 SetBuffer BackBuffer() light=CreateLight() RotateEntity light,90,0,0 tree=CreateSphere(8) HideEntity(tree) ; duplicate the entities later on camera=CreateCamera() PositionEntity camera,0,9,0 RotateEntity camera,90,0,0 placeTrees(tree,10,10,5,5,0) While Not KeyDown(1) Wend ;--------------------------------------------------------------------------------------------------- Function placeTrees (whichEntity, gridSizeX, gridSizeY, spacerX, spacerY, placeY) For y = 0 To gridSizeY For x = 0 To gridSizeX theEntity = CopyEntity (whichEntity) PositionEntity theEntity (spacerX * x), (spacerY * y),0 Next Next End Function