Plaing a grass-mesh on the map

Blitz3D Forums/Blitz3D Programming/Plaing a grass-mesh on the map

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.

;Place grass function

;srcGrass is the source mesh you want to place around the map
;amount is the amount of grass you want
;xStart is the beggining X location of you map, and xEnd is the end
;Ditto for zStart and zEnd


Function placeGrass(srcGrass,amount,xStart,xEnd,zStart,zEnd)

For g = 1 To amount

	grassX = Rnd(xStart,xEnd)
	grassZ = Rnd(zStart,zEnd)
				
	LinePick(grassX, 256, grassZ, 0, -512, 0)
	grassY = PickedY()

	grass = CopyEntity(srcGrass)
	PositionEntity grass,grassX,grassY,grassZ

Next