not sure if this is still the case in arma, but getpos select 2 within buildings almost always returns something near to 0, regardless of which floor the loon is standing on. the way to get around this is to turn the problem on its head, in a manner of speaking.
place a game logic 50 metres above the house. use the distance between it and the loons to determine which floor they are on. for example, if the distance between the second floor loon and the gl is 10 metres, the ground floor loon needs to be within 10 metres of the gl before he can be assumed to be on the second floor.