I want to create a way for the player to teleport a certain distance, which is simple enough. The issue arises when there's a wall in the way. I want to check for a wall before the teleport happens so that it won't work if the player will get trapped in there. Additionally, if the wall is low enough (such as a small raised platform), I want the player to teleport to the top of it rather than inside of it. If the wall is too high, nothing will happen.
I suppose the basic question is how do I check whether or not a wall is in a certain proximity to the player? If the wall is there, the teleport should be disabled, unless it's a relatively short height.
Additionally I'd like to be able to check whether there is a floor where the player teleports (if there isn't a floor where the teleported player would land, it should not work there).
If you've ever played MapleStory, certain characters have teleport which is almost precisely what I'm looking to do. The chief bandit's assaulter skill is also really close to what I intend to do. Thanks in advance for any help!