Magnetic/gravitational pull - Help!

I'm making a game - kind of like Yume Nikki - where the player will be in a massive and open space to explore and discover events that will form the narrative. I want to have objects that will pull the player to them, if that makes sense. Example - If the player walks within 5 tiles of the object, I want the player to be dragged over to it while trying to escape.

I have no idea how to make this happen and I'm fairly new to the program. Does anyone have any solutions or know of any scripts for this?

Original thread: https://forums.rpgmakerweb.com/threads/magnetic-gravitational-pull-help.126714/