Any help/ideas are appreciated!
You don't say
what you actually want to achieve, only
how If the idea is to walk along a predefined path, you can regard the tile centers as waypoints. You always move towards them, until you're in a distance that can't become any smaller. This requires some vector algebra:
// Given:
sf::Vector2f nextTileCenter = ...;
sf::Vector2f minionPosition = ...;
float minionSpeed = ...; // constant
// To compute:
float distanceToWalk = minionSpeed * elapsedTime;
sf::Vector2f direction = unitVector(nextTileCenter - minionPosition);
minionPosition += direction * distanceToWalk;
// Check if distance is small enough:
if (length(nextTileCenter - minionPosition) <= distanceToWalk / 2.f)
{
// Advance to next tile, so direction changes
}
It looks complicated, but it's actually simpler because you have no case differentiation on the direction. I'd suggest you use a fixed elapsed time for robustness, otherwise the game logic depends on the framerate and is non-deterministic.
unitVector() and
length() are self-explananatory functions, they exist ready-to-use
in my library Thor (the Vectors module can even be used without installing the library, just include the file).
There are some tweaks like comparing the squares for distances or adding a floating-point epsilon for the half distance to walk, but that should show the main principle.