# How to move actor to an object with specific enum variable?

**URL:** <https://forums.unrealengine.com/t/how-to-move-actor-to-an-object-with-specific-enum-variable/481502>\
**Category:** Editor Scripting\
**Tags:** Variable, sorting, ENUM, unreal-engine, Blueprint, question\
**Created:** [April 6, 2021, 6:44pm UTC](https://forums.unrealengine.com/t/how-to-move-actor-to-an-object-with-specific-enum-variable/481502 "2021-04-06T18:44:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xylena](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Xylena](https://forums.unrealengine.com/u/Xylena)\
**Post date:** [April 6, 2021, 6:44pm UTC](https://forums.unrealengine.com/t/how-to-move-actor-to-an-object-with-specific-enum-variable/481502/1 "2021-04-06T18:44:28Z")

</div>

So I’m making a sorting game and I want to have an interaction with items where I can choose a specific box for them. You see, there is, for example, a plastic bottle. When I interact with it, I can see some widget buttons such as ‘plastic’, ‘metal’, etc. There are also boxes with chosen enum variable and I want that bottle (after clicking on the ‘plastic’ button) to fly into this ‘plastic’ box. How can I connect that bottle with the enum variable in the box? How that bottle can locate the proper box on the stage?

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [April 7, 2021, 4:31pm UTC](https://forums.unrealengine.com/t/how-to-move-actor-to-an-object-with-specific-enum-variable/481502/2 "2021-04-07T16:31:49Z")

</div>

First of all, every box and every item should know its enum value and should keep it in some UPROPERTY. After that you can use **GetAllActorsOfClass** , **GetAllActorsWithInterface** or **GetAllActorsWithTag** from _Blueprint_, or just **TActorIterator** from _C++_ to iterate through scene actors collection and find out the one you are searching…
