How do I make the enemy chase the player, but when at a certain distance, the enemy attacks the player?

How do I make the enemy chase the player, but when at a certain distance, the enemy attacks the player with slide movement?

What is the expected result

I want the enemy slide attack determined by distance, from A to B, so the slide attack always has a precise distance.
and if it is possible I want the slide attack to look real with ease in and ease out movement, not just a linear movement. thanks

The actual result

for now, the actual result of the enemy slide attack was determined by object timing, and it was not precise, and the result changed sometimes.

The events right now

I use an object timer because I don’t know how to approach the desired result.

It seems to me that you can use “if distance between onjects player & skelet < (the distance you need)”, and as a jerk you can use “tween skelet X position” with the parameters tween identifier - at least that, To X - Player.X(), easing - EaseInQuad or EaseOutQuad, duration - I don’t know if it’s up to you to decide.
For adding tween actions you need to add tween behavior to Skelet.