Trying to dsetroy actor from array

I’m having a difficult time figuring this out.so I’m making a endless runner and in my tiles I’m spawning actors on the tile
0 to 3 of them and when spawned I add them to my ref array but when I call destroy actor it doesn’t work

Note
I’m using spawn actor from class to randomize the obstacle and the add component node is weird cause it spawns the off my tile whether I get relative or world transform.

All answers are greatly appreciated.

That link was accidental and not mine don’t mind it it’s nothing related to the question

show us your script so we can see what youve done. also the link there is because you didnt put a space between the . and so. since there is no space then it get read as a link.

I’ll get a pic for you asap but it’ll be a few hours before I can. So that’s what happened thanks

Here are the pics you wanted if you need more let me know.

I’m not a vet or anything, But I’d also create an array to tell you how many items have been created during each section. Because you have random amounts created you’d have to use guesswork to remove exactly what you need.
Having an Objects spawned array combined with the Obstacle ref array, you can use the objects spawned array to find out how many indexes to destroy&remove from obstacle ref array. For example you’d just run destroy actor and remove index 0 from obstacle ref array (objects spawned array amount of times).

You said you were having trouble destroying the actors though and none of those even cover that. How are you trying to destroy them?

I quickly threw together something to test but it’s working fine, I have no idea why it’s telling you it’s not compatible.

Maybe you can find something wrong with this as an example. What are you saving your ref’s as?

Sorry the reply button is not popping up. I shut down my pc and now turned it on again and its giving me a error saying the ref is not compatible.

Not sure what you mean by close out to engine. But I tried in various ways of loading content (cooked/standalone/PIE) and all worked as intended

I’m on my way to bed so hopefully you’ll find a solution but I think definitely post a picture of where you’re trying to destroy them.

I’ll try it out and see if I just made a mistake

Can you try adding a class array to your bp and test it (and make sure to close out the engine that where I get my error) my current class array has a rock and a tree in it for testing

I’ll post my destroy tile function soon it be some time though

Save and close out the engine and reload the the project is what I mean. Sorry about the confusion

Where are you destroying these actors? Any screen shots of that?

Oh… That error isn’t anything to do with trying to destroy them.
Seems like you have an error in your array somehow with the wrong type of item making its way in there. Check to make sure they’re all blueprints.
You can do all that destroy actor in a lot less work by the way(and have it scale so you don’t have to keep ‘upgrading’ it)

Here it is and you can see my error and the bottom too.

I’m using a spawn actor from class with it attached to my class array and all of them are blueprints. The error is causing it not to add to the array and messing the code up. Some tiles get destroyed but the ones with obstacles don’t get destroyed. So I guess my problem is how to properly add them to my ref array.

i accidentally clicked validate and now I’m stuck waiting 50 years to try something.
I had an idea that maybe things created as anything other than actor might be causing this like creating as worldstatic/dynamic. But it’s probably going to be an hour or so before I can actually test.