Racing Game Positioning system

Max of Float node by definition compares. My bad for not spotting it earlier.

Try this:

  1. Change the While loop for For Each that goest from array length to 0. this way you’ll assign automatically the highest value at last index, remove that from last array like you’re doing and for next loop get highest and assign it on 2 last index. This way you’ll go from high → low through the array to end up with it sorted from lowest → highest.

  2. For position, just assign the loop index + 1 and they’ll be sorted. For example: of 10 racers, loop starts with index of 9 → 1 + index = 10th position. Next loop of highest with index of 8 → 1 + index = 9th position, etc.

You don’t need this.
Screen Shot 2021-10-01 at 8.04.14 AM

Hope it helps.

1 Like