3. Global Crafter {{ currentPage ? currentPage.title : "" }}

Before you can continue with this Tutorial, you need to create your own Widget and add a Function to it, called openCrafter.

As Input should be a Data Table called Crafter.

The Input should be saved to a new Variable and then you need to get the SP8_S_Crafter Structure out of it and display the Crafter Widget.

Look inside SP8_WBP_Crafter inside the Directory RPG_Essentials / Example / Widgets, on how i did it.

What’s the difference between Global Crafter and normal Crafter?

It’s simple.

Global Crafter do not call the Interface Function SP8_CanUseCrafter and SP8_Overwrite_CanUseCrafter (PlayerTemplate).

But the Component will check, if the GlobalCrafter Variable inside the Details Panel of the Component does contain the Crafter which is used.

Example for both cases:

  • Global Crafter:

    • Crafter which can be opened everywhere by pressing a key.

    • Similiar to Minecraft.

  • Normal Crafter:

    • NPC, which can be interacted with to open the Crafter.

    • Inside SP8_CanUseCrafter you need to check if the Crafter NPC is in range.

    • Alternative you can create Crafters, for example which need a Level or Stat which is high enough to open/craft in the Crafter.

In this Tutorial we will create a Global Crafter, which can be opened by clicking the Key M.

This will be our Crafter (You can create a different one, if you want):

1. Now we are ready to start.

Open your Player BP and add a new Item to Global Crafter inside the Details Panel of the Crafter Component.

Add your Crafter Data Table to it.

2. Listen inside your Player BP to the Key M and call the openCrafter Function of your Crafter Widget.

Select as Input your Crafter Data Table.

If you now press the Key M inside your Game, you can open a Crafter and craft Items whereever you are.

{{{ content }}}