How to compare and sort several values

Can I ask how you’ll be calculating the distance travelled? Checkpoints?

Hi there Argosse, thanks for the replies! I actually got this working on my own (a miracle!) but I wondered about globalDict, its something which I see more and more and its very usefull! At the minute I am (or will) calculate distance by multiplying linear speed by a timer.

The example posted uses three cubes to represent cars, with three text objects that sort themselves (1st, 2nd etc). Controls are q and a and up/down (increase/ decrease distance travelled properties on two cubes).

When I figure out how to write the dist= speed x time bit I will add it in, as at the minute I am at a standstill as my AI uses nodes to navigate- I am experimenting with a pure radar based AI which does away with nodes so the calculated distance needs to be independent too.

Being paranoid, do you see a problem?


sort_by_distance.blend (378 KB)