You can easily mess with arrays of specific UObject types. Create a float property and then you are good to go: Just specify the name and you can sort , filter , get max or min elements based on that value.
great stuff, thanks!
I completed the error detection system in order to prevent the editor from crashing if the specified UProperty is not a float or is nonexistent. Will upload in a short time frame.
Also, an ‘error’ (2nd) exec node will be added.
Hi Zarkopafilis!
Great library you got here, but I ran into a crash.
I was using the ‘sort with property’ node to sort an array based on an enumeration’s byte value, but when triggered, the engine crashes and this error comes up on vs:
FloatProperty1 was nullptr.
(it also highlighted line 174 and 177 of the .cpp code as well)
Tell me if I’m using it wrong or not, but I hope a fix for it crashing can be made.
Thanks,
Lolon
How do i go about adding this code into my project, as i’m just following the ratchet and clank kitatus lessons? Any chance you can run me through it? Thanks muchly .
The c++ file provided is a Function-Library based class; so in the editor do:
Add New > New C++ Class > Blueprint Function Library
To avoid altering the provided class entirely, name the soon to be created class “ArraySort”
From there if you know the very basics of c++ class creation, you should be fine for the remainder of importing the file (Hope I didn’t sound rude here).
Hope that helps.
Hey sorry i didn’t notice this sooner, been busy with work. Unfortunately im not used to c++ programming so i didn’t find it rude, but i am wanting to learn it as it seems the most effective way to make mechanics within UE4.
Thanks.
Scrap that last comment, I figured it out XD onwards and upwards (Y).
Hey pal, i’m running into some trouble with the gamepad setup of the ratchet and clank series on kitatus studios, each time i run the game and press Y nothing appears, and secondly a bunch of errors are produced, any chance you can lend a hand?
It is planned but work and a game got in the way