Hello,
I have noticed there are no “Sort” for both ascending and descending.
How would I go about adding a sorting method that would sort objects with a field value that has “age” in it, where the youngest is at the beginning of the list and the oldest is at the end of the list?
Hey, thanks I know there is a way to sort in C++ code but I was asking about how to do it in Blueprint Scripting. That is why I posted it in Blueprint Scripting.
Then no, blueprint in current form does can’t support something like that, it would require custom K2Node
As said it is not possible without doing K2Node which is correct, except you can do it in blueprint with the twist of creating your own “MaxOfIntArray” or “MinOfIntArray” similar concept.
So what I did was created a function that did exactly the same except of outputting Integer as the Max or Min Value I outputted the object that is to be sorted, then from there I can loop through and rearrange it all. Which works, now this doesn’t work for really really big arrays as it can cause some delays on sorting so it is best that you keep the list as small as possible.
Can you send us a picture of your function ? 