Hi all, I am a beginner so bear with me. I have a Blueprint that is spawning actors and then immediately moving them in a direction and destroying them after a set length of time. Midway on their journey they pass trough a collision box. What I am trying to achieve is to be able to destroy them with a key press ONLY when they are in the collision box. It’s almost working with one problem: before they reach the collision box I can’t destroy them (good) when the first one hits the collision box I can destroy it and any subsequent spawned actors when they reach the box
(good) If I allow an actor to pass through the collision box and try to destroy the next actor in line, it destroys the first actor in the series NOT the one that’s in the collision box (bad). If I let all spawned actors move through the collision box I can’t destroy any of them (good).I have included a screenshot of my blueprint for reference. Any thoughts would be much appreciated.
No it’s in the level blueprint. I had a few issues with this. I couldn’t access my trigger box overlap events from the character blueprint. Also my event tick event that makes my actor move seems to only work as intended from the character Blueprint but then I couldn’t figure out how to also use my key press event in that same Blueprint. Sorry, major beginner over here.
My ideal set up is that the spawned actors are destroyed only in the trigger box and that if one passes through and out of the trigger box, it remains and only the actor inside the trigger box is destroyed even if another spawned actor passes through it without being destroyed. Does that make sense?
First, create “Circle 2” object ref array variable.
On Trigger begin and end overlap make a cast to Circle 2 each.
On begin if cast is passed add actor to array.
On end if cast is passed romeve actor from array.
On button press for each array and call destroy on each element. On complete clear array (just to keep it clean).