How to get the index/order of the actor ifself in the world?

I am trying to name a string value in one kind of actors from 0 (or 1) according to its spawn order in world and I want to obtain the index of the actor itself, but how? For ‘Get Display Name’ and ‘Get Object Name’, I have to separate the number and it only works for those actor without any number named in the ending(for those ending with number, it may number cover on the last digits). Any good solutions? thx.

It’s best either to number the actors with a tag, or to use blueprints, because then you can just give it an integer ID.

There’s no guarantee that things will get the same names every time, especially in the built version.

Sorry for my poor description. What I want to do is to name a tag/string value under my actor(with same actor class). Can I name it from 0 (or 1) one by one automatically according to its spawn order or some other logic?

You can do this

or

Thx! One more question, for those that already existed in the world (spawned by user in the editor), does the order remain consistent in the built version?

If you have a system where the player is adjusting levels, then you need to take that into account, and use a save game to maintain consistency: