Download

Get latest spwaned Actor of the same Actor

Hi Guys, I’m making an endless runner and my player Character Don’t move. The tiles coming towards him, so I can use the NavMesh for my enemies.
To spawn tiles im using a Spawner. The spawner uses the location of the spawned Tile to set the new tile.
But cause the tiles r moving, I have to observate the Point to Spawn the new tile. Do u have any idea, how I can find the last spawned actor, so I can use his EndPoint to spawn the new tile? When I use „get all actors of class“ the actors not sorted like I need it to. When I let them increment an integer in the tile base that counts everything on begin play, it’s always 1. So I can’t Identify them by that.
i would appreciate some help, ideas!
P.s. its Blueprint !

When you’re spawning, just keep the references in an array, that way the last spawn is always on the end, no?

Yes. I allrdy did this. Was just working to Long. Thx anyways