# Get Index of spawned objects

**URL:** <https://forums.unrealengine.com/t/get-index-of-spawned-objects/439152>\
**Category:** Blueprint\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [December 9, 2018, 11:52am UTC](https://forums.unrealengine.com/t/get-index-of-spawned-objects/439152 "2018-12-09T11:52:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![blomblomski](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@blomblomski](https://forums.unrealengine.com/u/blomblomski)\
**Post date:** [December 9, 2018, 11:52am UTC](https://forums.unrealengine.com/t/get-index-of-spawned-objects/439152/1 "2018-12-09T11:52:50Z")

</div>

Hey,

This maybe be a stupid question but I’m trying to learn.

I have a list of spawned AI ships that I add to an array, now I want to right click on them and select them as the target. At the moment I can manually set the index target but I’ve no idea how to get its index in the array based on which one I click on.

Thanks in advanced

---

<div class="post-metadata">

**Author:** ![Slavq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slavq](https://forums.unrealengine.com/u/Slavq)\
**Post date:** [December 9, 2018, 2:03pm UTC](https://forums.unrealengine.com/t/get-index-of-spawned-objects/439152/2 "2018-12-09T14:03:07Z")

</div>

You can get index of an object by using the FindItem node.

> **[Array Nodes](https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/Blueprints/UserGuide/Arrays/ArrayNodes/)**
>
> Nodes designed to aid in working with Blueprint arrays.

Use it like this:

 ![261764-ah5.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/8/4/384c18e3f7f6938a65dfa9c51b259a5c762a0556.png)

---

<div class="post-metadata">

**Author:** ![blomblomski](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@blomblomski](https://forums.unrealengine.com/u/blomblomski)\
**Post date:** [December 9, 2018, 3:04pm UTC](https://forums.unrealengine.com/t/get-index-of-spawned-objects/439152/3 "2018-12-09T15:04:18Z")

</div>

Cheers for that, I have actually solved myself without the need to use an array. I Check the objects names against the currently selected name
