bool array

I have a list of camos that can be put on a weapon and i was wondering what is the best way of doing this in umg widgets?

I was thinking about using a bool array and having that for the camos. Start by having 0 as true which is no camo on the gun
then when the player selected any camo of the list it would then set all the bools in the array to false to stop two camos on the gun at the same time.
Then it would change the bool to true for the camo they clicked so if the camo represented 5 in the array it would set all the bools to false then set 5 to true.

my question is what would i use to get all the bools in the array and then set them to false. What is the best way of doing this

I mainly use c++ so i dont know all of these nodes but i know some basic ones.

You may as well create and use an Enum if you’ll only ever allow one camo on at a time.

1 Like

Why don’t you just have an INT “SelectedCamo” set it to 5, then use that number to do what you need (access an array of textures/meshes/whatever)

Though in the end, if you’re displaying/hiding a set of objects you are always going to have to loop through with a foreach, turning them each on and off

Enums are the way to go.