How would I make a homing attack like this?

Hey y’all, I’m currently trying to test some things for a Mega Man recreation. I’m trying to figure out how to make an attack that takes the player position, and then fires a shot at the marked location. Basically, it sees where the player last was and fires an attack there. I don’t know if you can understand what I am trying to get help with, so here’s a video on basically what I was talking about https://www.youtube.com/watch?v=xN8bRm1nprM .

you can use the tilemap extension. There is a thing there that says “last location of mysprite” or something like that. you’ll have to clarify further