Ha ha. Maybe the situation is I don’t know what I’m doing when it comes to arrays
I thought what I was doing was easier than actually comparing them - put both the bike and the RaceProgress float into their own array at the same index. This way I know which RaceProgress belongs to which bike. Then after the list is completed, I grab the index with the highest value (IE most progress down the spline) and set that as RacePosition 1 (ie 1st place). Then I remove that same index from the Bikes array so they still line up, and increment the RacePosition to the next number IE 2. This way there’s no need to compare. The code would simply get the highest value from all the values stored in the array.
Maybe the problem is that some of the bikes may have the same value for their RaceProgress if they’re tied, but still, it should grab only one result, so I’d imagine it’d just arbitrarily assign them the next 2 positions.
1 Like