# Cycling through an Array - Visibility one actor at a time

**URL:** <https://forums.unrealengine.com/t/cycling-through-an-array-visibility-one-actor-at-a-time/2129353>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [November 16, 2024, 11:51pm UTC](https://forums.unrealengine.com/t/cycling-through-an-array-visibility-one-actor-at-a-time/2129353 "2024-11-16T23:51:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Studio3n3](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/studio3n3/32/738156_2.png) [@Studio3n3](https://forums.unrealengine.com/u/Studio3n3)\
**Post date:** [November 16, 2024, 11:51pm UTC](https://forums.unrealengine.com/t/cycling-through-an-array-visibility-one-actor-at-a-time/2129353/1 "2024-11-16T23:51:11Z")

</div>

Hi all!

I’ve been trying to set a BP cycling through an array of actors with tags, so it only shows one actor at a time but I’ve been struggling at the minute getting the logic right.

I used a multigate/flipflop but as you can see I need to press the F key twice to make the changes:

The BP:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/2/d/92d765847081170b5d6487ce742b56d4daeb7e42.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/3/e/b3e5ec8b89c9572d3c54f53049ee4f3136c769cc.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/c/3/ec3b59e506d3f438d5eba581081f4ab0493cc1db.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/d/c/3dcf16167c7aa85328e0ad860aec29b6d5396ee8.png)

Construction Script for Initial Visibility

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/b/5/db501dcf84e2dd748c06c39b5e94f755ba223381.png)

Also, the plan is to add a simple animation (Int 1 scales down, Int 2 scales up) and also adding a widget as an option with two arrows to go forward and backward.

Any help for pointing me in the right direction is greatly appreciated!

---

<div class="post-metadata">

**Author:** ![Caroo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/caroo/32/1008955_2.png) [@Caroo](https://forums.unrealengine.com/u/Caroo)\
**Post date:** [November 17, 2024, 9:13pm UTC](https://forums.unrealengine.com/t/cycling-through-an-array-visibility-one-actor-at-a-time/2129353/2 "2024-11-17T21:13:55Z")

</div>

As usual, there are many ways. I would say, in your case, just get rid of the gate. Everytime you make some actor visible, store it in a variable like “currently visible” or whatever you prefer. And when you press a key, first hide “currently visible” if it is valid, and then proceed with the rest of your code.
