I’m trying to get something to work that is driving me insane.
When i spawn an actor it must be names Marker1. Then Marker2 and so forth.
When i delete one the naming takes a step back. For example if i delete Marker3, the next one that will be created is called Marker3.
However somewhere i didnt design things correctly. Because if i created Marker1,2 and 3 and i delete Marker2, then the next time i create one its called Marker3. So i end up with 2 Marker3’s.
So i tried using Get allactorsofclass, then check the names and if the names are equal just delete everything. But that doesnt work well.
Im trying to find a way to basically do the following.
On clicked -> check if actor exists. If it does not spawn actor and name it Marker one. Then marker2 and so forth.
But If clicked and marker 1 does exist check if marker 2 exist, if it does not create it.
Its hard to explain what im going for… perhaps thats the main problem here. I cannot understand the logic though process behind my objective, and therefor cannot create it.