Setting up Damage Types for the Foliage Plugin
If you haven’t setup the Foliage Plugin yet, follow this tutorial first.
If you haven’t setup the Foliage Plugin yet, follow this tutorial first.
If you haven’t setup the Foliage Plugin yet, follow this tutorial first.
Important here is that the IDs (marked in RED) are the SAME, it doesn’t matter if the Destructible Mesh is Empty (if you don’t have one for a different mesh)
(this is only required for interacting with the foliage instances)
You must make sure that the Mesh you paint (or spawn) is the same in the Foliage DataTable so that the Foliage Plugin knows what to do with it.
Example of adding resources to your inventory when a Foliage is damaged (harvested)
This example uses a line trace from the Players point of view to “Apply Point Damage”
Damage is handled by the Foliage Plugin and will convert your Foliage Instance to a useable / interactable foliage actor automatically.
Begin by adding your building to the DT_Buildings DataTable
Add a new socket to the CompatibleSocketNames array, here you determine what sockets that this building component can be placed on, in this example, Door is our compatible socket name, every building that has the socket “Door” we will be able to snap our new building to.
Inside /BuildingSystem/Meshes, open up any mesh that require a “Door” (can be anything), in this example, we’ll use “SM_Simple_Cottage“
Once the Static Mesh Editor is open, in the lower right corner you’ll find the Sockets editor
Create a new socket and name it “Door”
In the “Preview Static Mesh” selector, pick the “SM_Simple_Door” mesh as a preview mesh so that we can position it correctly
Use the preview window to move the door into the correct position
You can do this for anything you want to “snap” onto a building
Version 1.2 is now available on the UE4 Marketplace!
You can get the building system here: https://www.unrealengine.com/marketplace/simple-building-system