i was originally trying to do the same before I realised I was much better off using a matrix. you could heightmap a matrix and update the character to A) stay at a height just above the matrix and B) not go above a certain height. there like one line of code in DBPRO for texture map but in DB its not pretty. I got a tutorial for it on darkbasic.net
once u have ur heightmapped matrix, just update the character Y postition with the ground height where the player is. i checked if the destination is more than 100 higher than the current position (ie a cliff) before moving
x# = object position x(1)
z# = object position z(1)
oldground# = get ground height(1,x#,z#)
` put your calulate new X,Y position code here
`
` new x,y positions calculated now?
ground# = get ground height(1,x#,z#)
if ground#>oldground#+100
POSITION OBJECT 1,x#,ground#+15,z#
endif
i know its real nasty and not sliding (and u can get stuck) but its a start

im still working on my own version. if anyone has tips on turning this code into sliding collision i'd be very grateful.
now i just hope i wrote it right