How to manipulate the unselected portions of the array?


I couldn’t seem to find an answer to this anywhere and maybe I’m doing this the wrong way as I’m still new to using arrays in Unreal. I have an array of 12 images in a widget menu. They are all on top of each other with only 1 having their render visibility set to 1. All other 11 have their render visibility set to 0. When clicking a button I want to cycle through all 12 images by turning on the index of the array image and making sure all the others stay at 0 as well as the previous one in the array now changing to 0.

I created a function called visibility slider which you can see an image of. Then in the main widget blueprint I call that function. Which you can see in the other image. The part I’m stuck on is that I want to get all of the other objects in the array BUT the current one to make sure to set their render visibility to 0.

Any suggestions would be really appreciated.

The typical and easiest thing to do is turn them all off, and then turn the right one on :slight_smile:

Hey! Thanks for the reply. Yeah I agree this is probably the easier way but I was hoping there might be a more efficient way than creating 12 separate nodes of a bunch of on/off functions for each time it changes. Thanks!

Like this:

Oh yes! That works! Thanks! Yeah I’m still learning about arrays. I figured I needed to use a For Each Loop. I just wasn’t sure how to set it up properly. THANKS!