Fandom

Crafting and Inventory System by Amphiprion Wiki

Player Control logic

5pages on
this wiki
Add New Page
Comments0 Share

This is mainly the default player brain created by Project Spark. But some update have been done, for example to manage overweighted.


OverweightEdit

For now, the movement rules have two states : overwheighted / not overweighted

The first thing is to check if the player is overweighted. To achieve that we need to check if the number inventory space occupied by items exceed the player max capacity. A move speed variable is used to track and set the player move speed.

Compute move speed













Now, if the player is overweighted, we disable the jump and dodge action. Here the example for the dodge action (allowed only if "moveSpeedFactor" >= 1):

Dodge





Open inventoryEdit

The player control logic host also the command to open the inventory using "DPad-up".

As we want that the player not more move or act when the inventory is opened, we push a new brain logic in the channel used for the input control. So the "Player Control" logic is temporarly masked by the new "InventoryManagement" logic.

Open-inventory





When the player will close the inventory, this new brain will be simply pushed from the channel, and then the previous "Player Control" logic will be automatically re-activated. This behavior is part of the "InventoryManagement" logic.

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.