Removing single instance of a foliage actor?

Hey The Cheese Dragon-

Here is an idea that may give you the effect you’re looking for. Create an Actor blueprint with an InstancedStaticMesh component. In the details panel there is a section for Instances that controls the number of instances for that particular blueprint. You can create as many instances as needed, each with its own transform. In the graph add a “Remove Instance” node which allows you to choose which instance is removed.

Hay ,

Yeah, that is what I have been trying, I have found the tricky bit is removing the right one because the remove instance node takes a int input rather than a location and I wont know which instance it is that a player has dealt damage to unless I can check by its position.

Thanks

In the blueprint with the instanced static mesh, for each instance you can create a box component over it. You can then add each of the box components to an array. If you turn off collision with the mesh and leave the box with an overlap event, then when the player overlaps the box it will get the box component array and return the index of which box is being overlapped. This index can then be used to remove both the box component at that index and the corresponding instance index. It is important to match the instanced mesh with its associated box component.

ah, cleaver, I will try this as soon as I get time.

Just thought I’d pitch in here , this is possible. I have made a working blueprint that will let you convert any instances to actors. Currently, I can walk around in my forest, and cut down trees (they fall over) that were placed using the foliage tool. I have also got a working BP that will let you place foliage at runtime with all of the foliage optimizations.

Ooooh I would like to see this blueprint of yours, any chance of some pictures or downloads?

I had kind of lost hope but I’m keen again if this is possible!

Wait this isn’t answered ! Jamendxman3 says they have an answer for it but they haven’t elaborated so your answer is not valid.

This is how you do it! Check out this video by AngryGamerTV (also known as Jamendxman3 I think)


its actually very simple, you can place the meshes how you like, using the foliage paint tool or the procedural foliage tool, all the blueprinting to make this work can just be done in your character’s BP