Info {{ currentPage ? currentPage.title : "" }}

SP8_ShopComponent

Option

Description

Global Shops

Global Shops are not calling Can Use Shop and can be opened everywhere.

You can leave the Array empty, if you want to make an Interactable Shop.

Shop Logging

Customize Logs

Example:

Key: Select LogType

Type: Can be left empty if not needed

SubType: Can be left empty if not needed (Sometimes it will be overwritten with different Values)

Message: What should be printed to the Chat Box.

OnlyOnDebug: If true, the Message will be only shown, if the “Shop Logging Debug” is set to true.

Shop Logging Debug

If set to true, every Log of the Shop Component will be shown in the Chat.

Function

Callable

Description

Default Use-Case

PurchaseItem

Server & Client

Purchase a Item from the Shop.

Calls isItemPurchasable, SP8_reduceCurrency and SP8_AddItemToInventory.

Called when clicked on a Item and submitted inside the Shop Widget.

isItemPurchasable

Server & Client

Checks if the Item can be purchased.

Calls SP8_HasEnoughCurrency and SP8_CheckIfInventoryHasEnoughSpace

Check inside the Shop Widget, if the Item can be purchased. If not show the Currency as red or something like that.

SP8_BPI_canUseShop (Only if you are not using SP8_PlayerTemplate)

Function

Callable

Description

When is it called?

SP8_canUseShop

Server & Client

Checks if the Player can buy Items from that Shop.

On Buy Item and you should call it

Shop LogTypes

LogType

Description

Error_ShopDoesNotContainItem

Could not find the Item inside the Shop.

Info_NotEnoughCurrencyToBuyItem

Interface Function hasEnoughCurrency returned false.

If using the PlayerTemplate: Sp8_Override_hasEnoughCurrency.

Info_NotEnoughSpaceInInventory

Interface Function CheckIfInventoryHasEnoughSpace returned false.

If using the PlayerTemplate: Sp8_Override_CheckIfInventoryHasEnoughSpace.

Error_ShopNotValid

The Shop Data Table is not valid.

Error_ShopDTRowNotFound

The Shop Data Table does not contain the Row “NewRow”.

Error_GlobalShopDoesNotExists

The Shop could not be found inside the Global Shop Array.

Info_BPI_CanUseShopReturnsFalse

Interface Function canUseShop returned false.

If using the PlayerTemplate: Sp8_Override_canUseShop.

Info_ItemPurchased

Succesfully purchased a Item from the Shop.

{{{ content }}}