Hi, how do you sort a couple of variables from lowest to highest, because i want to add a buff the would help the weakest player keep up with kills and the leading player to fall down in kills so one player doesn't gain to much momentum and one doesn't lose all his momentum.
Starcraft II has several sorting algorithms included, you can copy them.
When you open the trigger editor, you have the Library Window in the upper left corner (it says Built-In and Liberty, maybe also Campaign).
Click on Built-In, scroll down to Template, then Algorithms.
There you got several "Sort Scores" functions.
For your purpose Bubble Sort is a good idea.
You can just copy the stuff and use it yourself (I don't know how to use the templates directly >.>).
thanks, i was looking forever for the solution because the people who fell behind in kills just sorta stayed there, and the same goes for the people who had most kills
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi, how do you sort a couple of variables from lowest to highest, because i want to add a buff the would help the weakest player keep up with kills and the leading player to fall down in kills so one player doesn't gain to much momentum and one doesn't lose all his momentum.
Starcraft II has several sorting algorithms included, you can copy them.
When you open the trigger editor, you have the Library Window in the upper left corner (it says Built-In and Liberty, maybe also Campaign).
Click on Built-In, scroll down to Template, then Algorithms.
There you got several "Sort Scores" functions.
For your purpose Bubble Sort is a good idea.
You can just copy the stuff and use it yourself (I don't know how to use the templates directly >.>).
@s3rius: Go
thanks, i was looking forever for the solution because the people who fell behind in kills just sorta stayed there, and the same goes for the people who had most kills