question

bruhalt9 avatar image
bruhalt9 asked

help, my currency is going up instead of going up each day

hi, i have an issue with my currency, basically it gives the player a random amount of currency each minute or so, my currency settings are:

Initial deposit: 500

Recharge rate (units per day): 300

Recharge maximum: 999999999

anyone have answers?

Player DatamultiplayerPlayer Inventory
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Neils Shi avatar image
Neils Shi answered

so, is there no way for the player to receive 300 each day?

If you just want players to receive 300 VC once a day, you can use Scheduled Task. Scheduled tasks are a way to automate common game operation routines, you can set the Scheduled Task to be executed once a day, and it will grant players 300 VC each day. For more info, you may refer to the Scheduled tasks quickstart.

the player joins the game, he gets 500, each time the player logs in he gets 1 per minute, thats not what i want

As I mentioned before, if you set the recharge rate to 300, these 300 VC will be gradually granted to the player, and even if the player does not log in, the player will eventually receive 300 VC. Also please note that the value of the currency will only really increase when players try to get this currency.

i want it so when the player joins the game, 300 will be added

If you want players to receive 300 VC only when they join the game, you can complete it via CloudScript using Azure Functions. You can use API AddUserVirtualCurrency to increase the user's virtual currency by the stated amount and do some data check to ensure the player can get reward once a day.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

bruhalt9 avatar image bruhalt9 commented ·

the schedule task worked! thank you

0 Likes 0 ·
Neils Shi avatar image
Neils Shi answered

The recharge rate specifies how much of this virtual currency is granted to each player per day. Please note that the virtual currency that is granted to the player via a recharge rate is granted to them gradually, and is evenly distributed over a 24-hour period. In your case, you set the recharge rate to 300, and these 300 amounts of virtual currency will not be granted to the player in one go at a certain time. These 300 amounts of virtual currency will be gradually granted to the player, and the value of the currency will only really increase when players try to get these currency.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

bruhalt9 avatar image bruhalt9 commented ·

so, is there no way for the player to receive 300 each day? like for example: the player joins the game, he gets 500, each time the player logs in he gets 1 per minute, thats not what i want, i want it so when the player joins the game, 300 will be added, so, what should i do? should i just let this happen or remove it and make the script work locally

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.