I'm working on a pathfinder, trying to add support for height differences. The pathfinder determines if a tile can be stepped onto based on the height difference between the current tile and the one being checked by the pathfinder loop. The code for this function looks roughly like this:

Code:
+ On Loop "pathfind"
+ Height Value at ArrayXY(currentX +offsetX, currentY +offsetY) <= Height Value at ArrayXY(currentX, currentY) + Height Tolerance
- Approve Tile

(Height Tolerance is the maximum height difference allowed for the tile to be approved for stepping on)
This part works fine. However, I'd also like to prevent the tile from being stepped onto if the height of the current tile is too high in comparison (i.e. falling distance).


I was hoping that this could somehow tested with a single expression, perhaps using Range(>Value<, >Minimum<, >Maximum< ). But I can't wrap my head around how it would work. Any ideas?