How do I make an enemy charge at the player?

I’m making a top-down dungeon crawler with a boss that will charge at the player from time to time with a roar animation to signal it. I want the boss to charge in the direction of the player where the player was initially when the roar animation is finished so the boss doesn’t follow the player, but I also want the charge to keep going up until when the boss hits a wall. All that I have done is have the boss charge to the position of the player and stopping when it gets to that point which isn’t what I want.

So what I basically need is for the boss to charge in the direction of the player and not stopping until it hits a wall without following the player

I think I rewrote it in a working way:

Before charge: set (a sprite) to player’s x and y
Make it invisible
Set (boss) follow (a sprite) with speed: really fast

Figured it out thanks to you, I saw that the code that I thought was wrong was the exact same in your code which lead me to realise that the reason it wasn’t working was the fact that it was following the player at the same time, thus it wouldn’t go past the player since it was actively going towards them. You are a real lifesaver!