at first time flowing pass nodes it’ll going pass 1 2 3 4 5 6 7 9
then from second time flowing it’ll going pass 1 2 3 4 then 9
why its flow ignore my logic in loop body of 2nd While Loop ?
Can someone help me explain this, please ?
Upgrade :
My blueprint can basically like this
Thanks for helping bro <3
Because i choosed "Do not spawn " in SpawnActor node. so i wanna make sure if it’s not spawn because overlap with other actors (8), it’ll comeback looping at 4 till new location spawn valid.
This’s how i thought :
Set is valid vector = true
While ( is valid vector = true ) loop body will spawn actor with random location in array vectors.
Checking actor spawn or not by Branch node,
if actor spawned exit loop body and going to completed, add actor into array spawned actors.
if actor didn’t spawn so it’s not valid actor and looping again to spawn actor with new location random in array vectors.
Can i asking why i ticked is valid actor spawned be true and connect it with Set node, but it still be false ?
this way, both true and false going to add into Spawned Actors array ( idk if it was false it would add which actor into array while it’s not have any actor spawn there ?? )
just one fast question before i can running testing, i need making one actor box with correct scale transform, placing in level then actor spawn will spawn in that box ?
yah, i used length of array vectors as N.
i think your solution was best, but i got problem with my vectors array, so i need to checking this array again.
Thank you so much for helped bro <3 much apriciated
can i asking another problem ? it’s not in this post
it’s about my previously function - which i made with helped of chatgpt - it’s one function help me generating random vectors with input are Number vectors generating, min and max distance from old vector to next vector - and new vector to other vectors in array vectors generating.
Output is array vectors.
With your view, can i asking how would you making that function ?
So same to post full this function here cuz it’s looking really bad :
yah, minimum distance and maximum distance with vector right before it,
and > minimum distance with other vectors in array
example i want 3rd generating vetor will spawn in range 300 > 500 with second vector
and it’ll not in range < 300 with first vector too ( this’s mean new vector will not spawn in range < min distance )
p/s : my function is look like very complicate, so i think it’s not really nice to post all it’s up
i’m feeling hard to explain it all