Ah yes, I had forgotten all about that command. It works just perfectly, thanks for the tip. Problem solved.
For anyone interested, here's the correct syntax for the example above, as the "object" command doesn't work in Arma 2 anymore. Just an example:
unit setPos ((position player nearestObject 220142) buildingPos 1)
Edit: I take that back. BuildingPos doesn't return the exact height of the floor level. The units still seem to get injured when all they do is just stand still. This seems to be more of an engine problem rather than a mission editing problem. Bug tracker, anyone?