# How to get which number the actor duplicate is

**URL:** <https://forums.unrealengine.com/t/how-to-get-which-number-the-actor-duplicate-is/379746>\
**Category:** Blueprint\
**Tags:** Replication, point, integer, unreal-engine, Blueprint, question\
**Created:** [December 19, 2016, 11:36pm UTC](https://forums.unrealengine.com/t/how-to-get-which-number-the-actor-duplicate-is/379746 "2016-12-19T23:36:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nogdoesrandomstuff](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nogdoesrandomstuff](https://forums.unrealengine.com/u/nogdoesrandomstuff)\
**Post date:** [December 19, 2016, 11:36pm UTC](https://forums.unrealengine.com/t/how-to-get-which-number-the-actor-duplicate-is/379746/1 "2016-12-19T23:36:21Z")

</div>

The question was a little confusing, so to give a little context I am talking about the name of the character. When there are multiple blueprints in the world, the name of that blueprint will be Blueprintname\_0, Blueprintname\_1, etc. My question is how do I get that number within the blueprint? As in, what function should I call to get that integer? I am trying to spawn waypoints within the blueprint for each duplicate blueprint to follow, and I need the number to show which waypoint the duplicate should follow. If this is answered somewhere else or there is documentation please direct me to it. Also if there is a better way to do what is described above please let me know.

 ![119315-ue4+pic.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/5/3/95350032f78c983c42d5076eaa1c8057334d437a.png)

Thank you

---

<div class="post-metadata">

**Author:** ![Dartanlla](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dartanlla/32/724052_2.png) [@Dartanlla](https://forums.unrealengine.com/u/Dartanlla)\
**Post date:** [December 20, 2016, 2:03am UTC](https://forums.unrealengine.com/t/how-to-get-which-number-the-actor-duplicate-is/379746/2 "2016-12-20T02:03:24Z")

</div>

Yes, there is a better way. What you want to do is create an array inside your AiCharacter that holds your waypoints in the proper order. In my AiCharacter class I do this with an array of vectors, but in your case it looks like you are using a target point class. Trying to get the number at the end of the blueprint instance names is not a good method and is prone to error. A good pattern to follow is to try have some object holding pointers to objects related to it and not have to rely on Get Actors of Class which can be relatively expensive since it always has to iterate through the whole level instead of just the related actors.
