Picks are sensors basically. Define a origin, define a vector(From that origin) and define the radius of this virtual line in 3d space.(spherical)
Now, to check the ground beneath a tree..
hit=linepick(treeX,treeY,treeZ,0,-20,0)
;this will cast this virtual line and return the entiy hit if any.(Only checks entities that have a pickmode. poly is best)
then use pickedX,y,z etc to get exactly where the line and the geo(I.e the ground) meet. I.e exactly where you want to place the tree.
Now, to check the ground beneath a tree..
hit=linepick(treeX,treeY,treeZ,0,-20,0)
;this will cast this virtual line and return the entiy hit if any.(Only checks entities that have a pickmode. poly is best)
then use pickedX,y,z etc to get exactly where the line and the geo(I.e the ground) meet. I.e exactly where you want to place the tree.