Hey, so i’m having an issue getting overlapping actors, see below:
u
As you can see, for some reason only 2 of the overlapping actors get destroyed, using prints i can see that all the 4 actors overlap correctly so What am i doing wrong?
Hey, so i’m having an issue getting overlapping actors, see below:
Are you doing the Destroy only on completion of the loop? It also looks like it’s Breaking the loop if it finds a success, which (if I’m understanding what I’m seeing correctly) would mean it doesn’t go through each object it’s finding cause the loop is breaking
But it’s sort of hard to see what’s going on with all the overlapping node connections
connecting it directly to the actor destroy loop causes the same
and sorry, im going to tidy the code a bit and resend it
The image is bad. And incomplete - the starting loop.
the starting loop is just for spawning the actors
Why cast to bp_chunk? Better image would be helpful.
because you cant get a reference to it directly from the overlapping actors array
and wym with better image
You go from setting (repeat?request?)(bool) back to get all actors of a class.
it goes like this: i spawn the actor (resized chunk) i get the overlapping actors, then i check with a for each loop if any of them is a border, if it is, then i destroy the spawned chunk and try again, if it isnt then i destroy all the chunks that are overlapping with the spawned chunk
You cant destroy spawned chunk if you are going back to get all actors of a class (at the beginning loop), as mentioned before.
The first loop is important. Also, random thing can cause infinite loop. Also, you are not returning to get all actors of a class after destroying all overlapping actors.
yes i am, there is other code before this section to spawn more chunks so there are approx 100 chunks already spawned, and infinite loop has nothing to do with this issue
There is no line from destroy actor back to get all actors of a class after complete.
ohh, i though you mean the left for loop. still, i dont understand wym with the no line thing, its a for loop so, after complete, the thing loops again until it reaches the desired index. Still this has nothing to do with the main issue, im gonna fix the code later, i just wanna know why only 2 of the overlapping actors get destoryed.
Who gets the border variable to true or false? Don’t see that variable changing anywhere.
the border variable is already set to a type of chunk, thats it
Shouldn’t you destroy spawned chunk if you destroy all overlapping actors too?
no, i want the spawned chunk to replace the chunks where it spawns
for a better vision, u can see the images at the start
What if none have border set to true. The first loop ends and nothing happens. That’s why seeing the first loop IS important.