Re: Balance Mod
The other variables are there because they contain information that needs to remain associated with whatever "column" is chosen for the sort. Basically, it's like creating a new "list window" screen where you have all these columns and can sort by each one. In this case, we're just sorting by the distance column.
For example, the value stored in lst_AI_Attack_Location_Owner index 1 is associated with the value stored in lst_AI_Attack_Location_Distance index 1. When a sort is executed on the values in lst_AI_Attack_Location_Distance, the indexes are changed, so that index 1 might become index 5 etc. In conjunction, the index 1 value for lst_AI_Attack_Location_Owner needs to be switched to index 5 as well, to maintain the integrity of the data.
|