How to add money?

How would i add money to my game. https://playcanvas.com/editor/scene/1229247
also how would i give them money for completing a stage of parkour?

Hi @Granted,

You will have to register and integrate a payment gateway like PayPal or Stripe.

Try searching online and you will find a lot of tutorials on how to do that.

Im thinking like a in game currency that they lose when they fall but they earn when they complete a stage.

Hey @Granted, if you need an in-game currency system, you can try using localStorage or IndexedDB to store the player’s data. Due to the nature of these APIs, data is retained even when the browser tab is closed. You can then change these values depending on your in-game events.

Hope this helps!

How would i create a variable to store?

If you refer to the documentation link I sent you(HTML Web Storage API), there is a section that describes how to add new data to localStorage. There is something similar in the IndexedDB docs as well.