Sort Characters by their Speed Stat In Array (Turn Based Combat)

I tried this before in 4.27, is the same blueprints but in UE 5.4 it gives me infinite loop Error. The Function take some characters check their’s speeds and put them in an array of speeds, then it sort them from the high number to the lower. Then i Check every character speed to see if it’s the same of the sorted speeds. It should work, but it doesn’t want to, i can’t really get the problem why. I call the funtion only once in the begin play, and that make it crash the game. There’s an easier way to sort characters in order in an array based on their stats speed?

.

I resolved it. The problem was that i was using add Unique, that removes duplicates, so it was searching for the same speeds of the characters not matching forever.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.