How to make the character go back to the current floor no matter whether he walks upstairs or downstairs?

How to make the character go back to the current floor no matter whether he walks upstairs or downstairs?
Just like this game.
Maybe Level Streaming?