How to sort multiple value in order?

Hi, I’m currently making a mariokart with blueprints. I need to set up the positions of every player (actually 4) : 1st, 2nd …

I need this to set up the “random” for getting items.

I decided to set up positions players comparing their actual lap, the last checkpoint they hited and the distance to the next checkpoint.

The checkpoints are triggers I put on the map along the road. When a player hit a checkpoint it actualize his checkpoint value(integer).

I succed to get all values from everyplayer in a same blueprint ( my GameMode blueprint) but I really dont know how to sort them.

I need first to check lap from each players, if some are equals I check the last checkpoint and if there is still equals value I check the distance from next checkpoint(wich is a float so there si no equality.

Any idea how to do that with blueprints ?

That’s perfect to sort the distance to next checkpoint but I dont know how to verify when players are in same lap or checkpoint.