Here, here is Padrox.
I’m making an inventory and I would like to sort my pets from the equipped and after the non equipped pets.
I’m using a UIGridLayout.
How can I do this?
Here, here is Padrox.
I’m making an inventory and I would like to sort my pets from the equipped and after the non equipped pets.
I’m using a UIGridLayout.
How can I do this?
Firstly you would need to find out which tool is equipped then do your function which would put a frame into your custom inventory and then do the non-equipped tools.
Padrox, in your UIGridLayout, set the sorting by “LayoutOrder” and then, put the layout order property of your templates at first.
So, if the LayoutOrder property of your template is 1, it comes first, if it’s 2, it comes second etc.
So when I equip a pet i change the pets template’s Layout Order to 2 and When I unequip it change the Layout Order to 1?
No, put every non-equipped template to like “8” and then, whenever the player equips a pet, set the layout order to the number of already equipped pets + 1
So, if the player has 0 pets equipped, LayoutOrder would be 1, 1 pet equipped would be 2 and etc. Also, don’t forget to set the template layout order to 8 when unequipped.
Ok thx you very much !
I’ll give you my feedback !
K, if it works, put it as the solution so we know it’s solved ^^
I already put your comment as the solution xD
So it is working perfectly!
Thank you for your help !