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

SP8_CurrencyComponent

Option

Description

Starting Currency

Set the Currency the Player will get, if he is new (For testing).

Key: Gameplay Tag of the Currency

Value: Amount of the Currency

Currency Converter

The Currency Component converts automaticly the FromCurrency to the ToCurrency if the Value of the FromCurrency reaches the setted Value.

FromCurrency:

CurrencyType: Gameplay Tag of the Currency which will be converted

Value: Amount of the Currency which will be converted

ToCurrency:

CurrencyType: Gameplay Tag of the Currency

Value: Amount of the Currency which will be added

Currency 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 “Currency Logging Debug” is set to true.

Currency Logging Debug

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

Function

Callable

Description

Default Use-Case

getCurrentAmount

Server & Client

Get the current Amount of a Currency.

To display to the Player

addAmount

Server

Add an Amount to a Currency.

On picking up Items or selling something

reduceAmount

Server

Reduce a Amount of a Currency.

On Buying something

hasEnoughAmount

Server & Client

Check if a Currency has enough Amount.

Before buying something to check if the Player can buy it

hasEnoughAmountMultiple

Server & Client

Check if multiple Currencies has enough Amount.

Before buying something to check if the Player can buy it

getAllCurrencies

Server & Client

Get all Currencies.

Will only display the Currencies, which were already called!

To display to the Player

Initialize

Server

If you are using your own Save System, you can use this Function to set the Informations, which this Component needs.

Only if you do not call Load!

Load

Server

Load all variables

Should be called on start.

Save

Server

Save all variables

Dispatcher

Called

Description

Default Use-Case

CurrencyChanged

Client

Called if a Currency changed.

Change the Currency displayed to the Player.

Initialized

Client

Called if all Variables are set and the Component can be used

Initialize all Widgets and stop loading Screen if all Components are initialized.

Currency LogTypes

LogType

Description

Info_Initialized

Called on Initialized

Error_AddingAmountNotBiggerThen0

The adding Amount was to low

Info_AmountAddedToCurrency

How much Amount was added to Currency

SubType will be overwritten like this: <CurrencyType>|<Amount>

Info_AmountRemovedFromCurrency

How much Amount was reduced from Currency

SubType will be overwritten like this: <CurrencyType>|<Amount>

Error_SubtractAmountNotBiggerThen0

The reducing Amount was to low

Info_ConvertionFailed

Player has not enough Amount to convert

Error_ValueNotBiggerThen0

The submitted Amount was to low

Info_NotEnoughCurrency

Not enough Amount of Currency

{{{ content }}}