edited January 2017 in ORK Scripting
Dear ORK Team,

we are using ORK framework as our scripting backbone for our mobile game. The game is almost finished, the only thing left is the In App Purchase system. We have created currency called "Gems" as our premium currency.

The issue we are facing now, is that we have bought Simple IAP asset to help us with the billing. How does the ORK framework handle the currency. How can I use it in our scripts? How do I link it with the Unity or other 3rd party billing system?

Thank you very much in advance,
SaVe
Post edited by save1418 on
  • edited January 2017
    I'd be interested to know this too. In ORK you set up the name of the currency you're using to buy and sell--you can have more than one---but how this translates to in app purchases and real dollars in the app store on mobile, whether apple or google play---I'm not sure. I think part of the answer has to come from the developer of Simple IAP and part from gamingislove here.

    My suggestion would be to start with Simple IAP and ask them what code they need in Unity and then ask gil how to do that in ORK.

    I'd be interested to know because most games on mobile are free now with in app purchases so it's very important to know how to integrate that into the framework you're using.

    Post edited by Catacomber on
  • This will in any case require custom scripting - two ways this can be done:

    1) Separate store outside of ORK (probably provided by the IAP solution), which will add the currency (or whatever item you want) to the player's inventory in a callback function when the purchase was made.
    E.g. to add 100 of currency index/ID 0:
    ORK.Game.ActiveGroup.Leader.Inventory.AddMoney(0, 100, true, true);
    You can find the API of the inventory class here.

    2) Change ORK's code to start the IAP process when buying in an ORK shop and add the stuff upon callback from the IAP solution.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thank you very much for the quick answer. It definately helped me a lot and I will give it a try and also let Catacomber know if it worked.

    A question, if that is okay. What option would you prefer personally Gil in my spot. I am more or less a nub in C# so I have no idea how to change ORK's code. Is there any way you can give me a hint on how to do it, or where to look/study?

    Thank you,
    SaVe
  • edited January 2017
    So I have tried it with the custom script using the line in the option 1 and it works! I have tested it also in the Google Play store and it works like a charm. It loads the simple IAP system internal purchase script (I had to use a custom script for Simple IAP asset as well).

    Thank you very much for the quick help, you are epic :)
    SaVe
    Post edited by save1418 on
  • The sample script is Gil's? What is the line in option 1? Is that in Simple IAP's scripts. Don't post their scripts here but just give us some idea how you integrated it if you have the time. I'm happy to buy their asset. Thanks.
  • Option 1 is definitely the easier (and probably better) way to do it :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • @Catacomber: Yes we have bought the Simple IAP asset here: https://www.assetstore.unity3d.com/en/#!/content/12343

    You need to modify their scripts first to create your "own" IAP system. Then you need to create new scripts that enables their IAP asset. Finally you need to adjust the whole thing with what Gil wrote here :)
  • edited January 2017
    If you would have the time to do a tutorial on this I think it would be very helpful. Thanks! If you can do it without quoting their scripts. Or if you could pm me how to do it if I buy the asset, that would be helpful too. Thanks again.


    Post edited by Catacomber on
Sign In or Register to comment.