Integrating the Foliage System with the Survival Template (MSGT)

Begin by migrating the FoliageSystem to your MSGT Content folder

 

 

Add the C-Foliage component to your SurvivalController

 

 

SurvivalController > GetActionType() function

 

 

Copy all the Events and variables from GS_FoliageGameState Blueprint
Paste them into the SurvivalGameState Blueprint.

 

 

You'll also have to re-create the 2 missing
functions inside the SurvivalGameState

 

 

Open the Str_Resources struct file inside /FoliageSystem
change the RewardWhenHarvested struct type to "Str_SGT_Inventory_Entry"

 

 

Change the Struct type inside BPI_Foliage, see image below.

 

 

Open the BP_MasterResource Blueprint, re-connect the
missing link inside GetRewardFromFoliageActor() function.

 

 

Replace the old Blueprint nodes with the 
ones you see below inside C-Foliage Component

 

 

 

Open the function ReplaceInstanceWithActor inside C-Foliage Component
replace GS_FoliageGameState with SurvivalGameState.

 

 

Edit DT_Resources, change the Reward settings to whatever you
 want this Tree to reward the player with.

 

 

Make sure the ResourceMesh is EXACTLY the same as
the Mesh you are "planting" with your Foliage Placement tool.

 

 

SurvivalController > BeginPlay, it should look like this:

 

 

Dry Eel Development

This website is dedicated to Dry Eel Development, projects developed for Unreal Engine 4.

Categories all