Sorting actor array based on variables

This is from another topic, but it’s the same logic:

Result: