Destroy actor without destroying children?

Yes, that’s what I tried to do, however the road spawns the obstacle onto itself in the construction event, which doesn’t let me use “spawn actor from class”. Is there another way to create an obstacle when the road gets created?

The way this thing works (its from the endless runner tutorial):

  • Piece of road gets spawned, it has 3 arrows attached, each representing a spawn position for the obstacle
  • The locations of the 3 arrows get put into an array
  • In the construction event the piece of road creates a child actor (because spawn actor from class doesnt work in the construction event) at the location of a random arrow out of the three arrows.

To learn more I’m trying to modify this so it spawns cars instead of obstacles. These cars drive forward on the road, which is why I don’t want to destroy them when the piece of road it was spawned on leaves the scenery. Since they both travel in opposite directions the piece of road gets destroyed behind the player when the cars are still visible, meaning they disappear in front of the players eyes.