Fandom

Crafting and Inventory System by Amphiprion Wiki

Player Brain update

5pages on
this wiki
Add New Page
Comments2 Share

This page list all of the update you need to do on your "player" character brain, to activate the different system of this mod.

Specific inventory max capacityEdit

The inventory system as no hard limit on the number of items a character can bring. But if the number of place taken by items exceed a soft limit, your player will be overwheight and it will be impossible to run, jump or evade.

Defining the soft cap of the inventoryEdit

This cap is defined using the "MAX_CAPACITY" number variable. So add it under a "once" block of your player Brain. Putting it in a "once" block allow you to update this value anytime during your game adventure, for example, by creating a merchant allowing the player to buy additionnal place for its inventory.

Inv max capa





Adding player control logic to your playerEdit

To implement the inventory system in your world, you need to add the "Player Control" brain to your own player in the "playerControlChanel". This logic is detailed here.

Here the kode to add the player control logic to your player brain in a specific channel named "playerControlChannel"

This channel will contain the brain reacting to user inputs, so by default this channel will contains the brain allowing the player to move, pick, jump, etc..., but when the player open its inventory, a new brain is pushed in this channel, so from now, the controller will be used to interaced with the inventory screen and no more to move the player. Then when leaving the inventory screen, the new brain is poped, and then the previous brain in this channel is reactivated (player control)

PlayerControlChannel

Adding inventory content logic to your playerEdit

The inventory content logic contains all is needed to manage player inventory like stacking a new added item when possible. For more detailed information about this logic, go here.

For now, all you need to do, is to add the inventory content logic to your player brain in a specific channel named "inventorySystemChannel"

InventorySystemChannel

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.