Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Racing Place System - AKA Trouble Sorting


Recommended Posts

Okay, MMF user here, 1.5 and all that good garbage. I've run into a small problem trying to sort numbers.

I'm basically trying to implement a placing system in a racing game. (Ex. Plaer in the lead is shown as first, runner up is shown as second, etc. etc. while constantly updating every second) I try to do this by having counters increment up as the racer get closer to the finish. Thing is, MMF can only compare numbers, not sort. So I download one of the sort extensions MMF has. I run into a sad little problem.

You can't tell what numbers came from which.

So basically, if one number was 8 in the sorted array, there'd be no telling which counter it belonged to unless you did MMF's good ol' comparing system. But that has a flaw in it. What if two counters are the same value? MMF get's confused and attempts to label two values as two counters. Meaning one value is both counters and so is the other. This generally makes actually sorting the places near impossible. Help?

Link to comment
Share on other sites

Uhm...yeah....bump.

So the sorting numbers things has gotten a bit since the last person helped. (Okay, that was never but I'm gonna pretend someone helped...) I have the counters working fine, the sorting is doing it's job but guess what? IT COMPARES SQUAT.

arghstupidsort.png

^ According to above formula, it should work. However, MMF goes ahead and becomes a total retard by saying that the forth counter is ALWAYS the greatest...in fact, it says that the forth counter equals EVERY position in the sorted array! I've looked at the internals and everything, every position in the array actually turns out to be different as time goes on. However, it continues doing this to me. Anyone know what I'm doing wrong? (I know it's gonna be something utterly stupid that I should've known)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...