How to grow trees as you go along?

Hello, I would like to know how I can make to grow trees as time goes by in my level? thank you very much for your answers. cordially.

Hi, I can think of two options:

(1) Write your own procedural spawn system for trees from scratch

(2) Use the procedural foliage spawner or foliage paint tool to spawn the maximum amount of trees you want to have on the map. Then remove some (randomly or with blockers) until you have the amount of foliage you want to start with. But as you remove the foliage, save their transforms into an array to later respawn those trees. [HR][/HR]
Both times you would need knowledge about “Instanced Static Mesh Components”. Basically each foliage type will be a new “Instanced Static Mesh Component”. Those hold a static mesh (that would be the static mesh of the foliage) and an array of transforms (the transforms of all those instances of the foliage). From the “Instanced Static Mesh Component” there are several nodes you can use (Add Instance, Remove Instance, Update Instance Transform, …)

One way you can access the “Instanced Static Mesh Components” you’ve painted with the foliage tool / created with the procedural foliage spawner, is via the “InstancedFoliageActor” (so get all actors by class -> “InstancedFoliageActor” -> get the first one in the array, since there will only exist one, -> from that use “GetComponentsByClass” with “InstancedStaticMeshComponent”). [HR][/HR]
So you can use “Update Instance Transform” to simulate growth of the trees and “AddInstance”/“RemoveInstance” to add/remove them.

Hello ! Thank you very much for answering me! I will dig a little on this side in this case! I hope to do it !! Thank you very much my friends !