Set visibility after clearing and adding child widgets to wrap box

I am currently trying to make a list of widgets using a wrap box. What I’m trying to do is when they click on a button in the child widget, a checkmark will appear in the top right corner of the child widget. The problem is that I have multiple child widgets that will have the same function (checkmark appearing in the top right corner of the widget). I don’t want multiple child widgets to have the checkmark at once though. I came up with a system I thought would work, but it’s not. Here are some screenshots to further help.

Child widgets designer tab:
666d8464de978cbd28801a73977f81c5935d6922.png

Child widgets event graph:

“Create Widgets” function:
689768865cb51586920dfaf6cfcdb4b626d9a206.png

Anyone have any idea on why this isn’t working?

Why do you clear the children and re-create them? Either way you can get all children and make a For loop to set the logo’s visibility to false

The reason I clear them and re-create them is so if there are any other child widgets that have been clicked I can reset it and then set it to the one I had just clicked on. Where would I use this for loop? Would you be able to provide a quick example?

Okay sorry it took me a while. Here’s a picture, I hope you can see everything clearly(might need some zooming).

I also added numbers and give a bit of explanation for each

afd07f0f11359974d647f631b16685f4fab76670.jpeg

  1. Basic HUD with all the images you have for selection. Each image is a different widget.
  2. The widget with the image. As you can see I binded the visibility with a function so it will only be visible when the variable “isChecked” is true(on image 4)
  3. The event when you click on the image. It’s gets all the small widgets and set the isChecked to false, that will automatically hide your check image(water in my case)
  4. And lastly the function that set’s the visibility of your check button depending on isChecked variable.
    Let me know if you have more questions :slight_smile:

I have a question. In the 3rd picture, is that “isChecked” variable from another widget? If it is, I have more than 2 widgets, 103 to be exact lol. So, is there a more efficient way of doing this? Also, what widget are you referencing in the “Get All Widgets Of Class” node?

the isChecked variable is created in the image widget(image number 2), where we have only 1 picture and 1 checkbox(well image aswell). So if you have 100 instances of it, it doesn’t really matter, all of them will be unselected, and then the one you clicked will be selected :slight_smile:

How did you get the target pin on the “isChecked?” variable if it’s a variable from the same widget. I’m confused lol

Haha, well look, first we get every single instance of that widget, including itself. Then sets the isChecked to false. When this is done, it locally sets the isChecked to true(the one u clicked!)