How to make Bi-fold door blueprint?

Is there a way to make the function open when it is close and close when it is far away?