Rss

  • youtube

Foliage Plugin + Survival Game Kit (SGT)

Enable the Foliage Plugin



Create the Data Table (Foliage Data)



Create a Blueprint Class of type FoliagePluginActor



Assign the Data Table and the Foliage Actor in the Project Settings



Change the Component Class for your Foliage to use the “FoliagePluginComponent”



Create a new Tree resource in the Foliage Data Table you previously created, see example below



Create a new Rock resource in the Foliage Data Table you previously created, see example below



In the BP_SurvivalCharacter Blueprint, add the Foliage Plugin Interface



Example of adding the harvested resources to our inventory



Example of how to enable Melee Weapons to harvest Trees and Rocks

Open the “BP_MasterMeleeWeapon” Blueprint (/Blueprints/Holdables/BP_MasterMeleeWeapon) and modify the “Give Damage Once” function to the example below:



Example of how to enable harvesting with “E” Interact Key

Open the “BP_PlayerInventoryComponent” (/Blueprints/Components) and modify the “Is inventory actor?” macro as such:



Open the “Is interactable?” Macro and modify as such: