I’m trying to figure out how I can set the order of an array of objects (actor BPs) based on an Int set on the object. I’ve found examples of taking an array of Ints and using the Min or Max node, but how would I do this if the array I have is not the info I’m trying to sort? Is this even possible? I’ve thought about pushing the array to a new array in the same order, sorting that and then re-setting the original array in that order, but how can I make sure that my indexes match up correctly doing that?
Basic setup: Playing Card BP (based on how Black Jack example project did cards), has a variable Int that denotes the order of the card in its suit. I need to look at 5 cards in an array and order them from high to low (or reverse, not sure what’s best yet). I’m trying to do this to be able to properly score hands of Cribbage if that helps anyone. Here’s the general idea I’m working off of:
Look towards the bottom on the Runs scoring. I’ve gotten everything else to work. If anyone has a better way to do this, I’m all ears (and eyes if you have examples that would help a lot).