Set the static mesh to be pickable - entitypickmode 2 then use linepicks.
Assuming the mesh is 200x200 units square and the maximum height of the mesh is 100 units ..
You may want to add in checks to make sure there aren't 2 gems at the same point.
If you need the gem to align to the landscape you could use ...
aligntovector pickednx(), pickedny(), pickednz(), 2
after positioning.
Stevie
Assuming the mesh is 200x200 units square and the maximum height of the mesh is 100 units ..
gem = loadmesh("mygem") for l = 1 to 100 x# = rand(-100,100 ) z# = rand(-100,100 ) copy = copyentity( gem ) linepick x, 110, z, 0,-120,0 positionentity copy, x,pickedy()+1, z next
You may want to add in checks to make sure there aren't 2 gems at the same point.
If you need the gem to align to the landscape you could use ...
aligntovector pickednx(), pickedny(), pickednz(), 2
after positioning.
Stevie