Hey @primaldragon100!
You can achieve this by following the steps below:
- Get a
For Each Loop
node and plug theOut Actors
pin of theGet All Actors of Class
into it’sArray
pin - Create an int type array and store the current element’s speed (which you can get from the
Array Element
pin) inside the array using theSet Array Elem
node. And leave theIndex
pin of the node as 0 (also check the Size to Fit option) - Compare the first element of our array (which you can get using the
Get
node and leaving the index as 0) with the second one using a “>” (is greater than) and aBranch
node. Make sure to plug the first element into the A pin (the upper one) of the “>” node and the second into the B pin (the lower one) - After the
True
pin of theBranch
node, use the Set Array Elem node again to set the second element of our array to the current element’s speed (or the first element of our array). So you’ll need to set theIndex
pin of the node to 1 this time as the one single difference from our first use case of this node. - After the
False
pin of theBranch
node, check if the first and second elements of our array are equal using an “==” (is equal to) and a Branch node. - After the
True
pin of our second Branch node, plug our array into aShuffle
node. Then set the second element of our array to the first element of our array the same way we did in step #4.
Before all of these, store the first ever element’s speed inside our array as the second element, and only then start triggering this logic for the next loops. There’re a bunch of ways to do that, you can see one of the ways to do it from my latest post under this topic.
And here’s an image of the whole thing that I was able to make after launching my PC:
Hope this helps!