1. Home
  2. Docs
  3. Foliage Plugin
  4. Tutorials
  5. Survival Game Kit v1

Survival Game Kit v1

This tutorial is outdated and may require changes when using a newer version of the Survival Game Kit

Video Demonstration

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

(FOLIAGE ACTOR HAS BEEN MOVED TO THE DATATABLE)

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

SET THE BP_FOLIAGEACTOR CLASS THAT YOU CREATED EARLIER IN THE DATATABLE

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

OPEN THE “IS INTERACTABLE?” MACRO AND MODIFY AS SUCH

How can we help?