Enabling a specific object in an Array of Game Objects, and switching between them with button presses

OK, so this is being written by me at like 10 minutes in the morning after spending the whole day trying and failing to get this working - if any more info is needed then I’ll probably add that soon as I get back on tomorrow.

Basically, I’ve got a list of objects (each one an Avatar Pedestal) that I’ve loaded into an Array. I’m hoping to be able to have all of them disabled, and then enable them one at a time in a list (one button to go to the next one, one button to go to the previous one, and a button to change into the avatar).
What I tried was to create a second variable called “Array Number”, and use that to tell the program what number avatar it’s on right now - incrementing it up one for next avatar, minus 1 for previous avatar.

But I just can’t get it working, no matter what I try - with my setup (which logically seems like it should work) none of the buttons do anything when triggered (in Unity or when built), and there are no errors anywhere telling me what’s going wrong…

Could anyone give an example of a node setup for this? As I said I’m half asleep right now so IDK if I explained it very well, but I’ll hopefully be a bit more lucid tomorrow…

Post a screenshot of what you currently have. Bit easier to tell you what you did wrong then.

Right, OK, I’m back and far less tired.
So, this is what I’ve got currently - I ended up deleting my original script, but this is an exact recreation of one of the buttons (the “Next” button, which should hide the current pedestal, increment the Array number by 1, then show the new pedestal). The “Back” button is basically identical, though logically inverted to decrease the array number rather than increase it.
Bear in mind I also included the Custom Event from the seperate button gameobject, partly because I have no idea if that would work how it is and want to double-check it, but I have also tested the main script with a standard Trigger Event input (which I know works) and it still doesn’t do anything.


Haven’t tried doing anything with the “Select” button yet, as the problems with this script would likely carry over to that one as well (since it would use a similar array system).