question

C Alexandre avatar image
C Alexandre asked

(Noob) Rules for substraction of virtual currency ?

Hello, I'm a 3D artist that learned block coding on Spark ar, please keep it simple for me :)

Curently I'm using a custom Event that is triggering a rule to add virtual currency :

Things I have tried :


- Subtract user currency node on unreal blurint can work but it's ain't safe enough.

- I have been looking into doing a cloud script but i'm getting lost with this.

Is there no action to substract virtual currency ?

Thank you :)

captureplayfab.png (37.5 KiB)
10 |1200

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

1 Answer

·
Seth Du avatar image
Seth Du answered

If it is statistics, simply input negative value in Amount field will subtract the value. Meanwhile currently it is not supported to subtract VC using action without Azure Function. Please feel free to submit a Feature Request on https://community.playfab.com/spaces/24/index.html.

You may create an Azure Function to subtract Virtual Currency with Server API calls, please follow the instructions on PlayFab CloudScript using Azure Functions Quickstart Guide - PlayFab | Microsoft Docs

2 comments
10 |1200

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

C Alexandre avatar image C Alexandre commented ·

negative value on virtual currency doesn't work it's seems to only work with positive values. I'm goint to dig azure functions then.

Thank you !

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ C Alexandre commented ·

Feel free to post a new thread if you have any questions on Azure Function. One hint here is to follow the official document only, especially this section -- PlayFab CloudScript Context, Variables and Server SDKs. It is highly recommended to import CS2AFHelperClasses.cs to help handle the request context and parameter.

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.