I was wondering about the sort method for Array. If you have an of some objects, such as an array of actors, can you sort or do other actions based on one or more of the object's values?
For example, you might have an array of actors which you need to sort by their agility for turn-taking. Likewise, I'm also wondering if you could use functions like union, intersection, or uniq based on one index value or multiple indeces' values.
An example would be that maybe I add some value to Game_Actor that's determined randomly, and I want the game to make an array of five of the same actor with a diff random_val and choose the one with the best random value of them. So, I'd want it to first sort them by random_val, and then use uniq, but because all though they're the same actor, they have a diff random_val, which normally would cause uniq to by-pass them, but in this case I want them deleted.