In-app purchase is unlocking two characters and not just the one.

Jayden.goodallJayden.goodall Posts: 15Member, PRO
edited March 2017 in Working with GS (Mac)

Hey everyone,
So I currently have two characters that are purchasable through the IN-APP purchase system.

Both characters have the same transcript.

So that is my table setup above.
Below is the button (Buy) they press when they wish to purchase the selected animal (in this case the ladybug).
The set out for the other animal is the exact same, except for the in-app purchase - buy item.
The table ID is set for the row below.

The Product id between Apple and Gamesalad is correct.
When the purchase is put through for one, both of the animals unlock which is what I'm trying to avoid.

This is all done on a MAC.
Any help would be much appreciated! :)


  • Jayden.goodallJayden.goodall Posts: 15Member, PRO


  • pHghostpHghost London, UKPosts: 2,280Member

    Can you screenshot the whole logic of 'Buy Ladybug?' There is a closed rule and we don't see the whole content in the expression editor of the Buy Item behaviour. That way, it's pretty impossible to give you any advice.

  • BigDaveBigDave Posts: 2,239Member
    edited March 2017

    the first odd thing I see here is that for product ID you use "table cell value"
    you only have to post your ID there no reference to the table value so just

  • pHghostpHghost London, UKPosts: 2,280Member

    @BigDave said:
    the first odd thing I see

    It's a bit atypical to do it like this, but there is nothing wrong with it per se, if you reference the right table cell, it will give you the correct name. The benefit is of course that if you decide to change the product ID -- from a string of numbers to some clearer name -- it won't mess up your in-app purchase rules.

  • pHghostpHghost London, UKPosts: 2,280Member

    But yeah, that's why I need to see the whole expression, to make sure no nonsense is happening in there.

  • Jayden.goodallJayden.goodall Posts: 15Member, PRO

    Since writing this post, I have changed the "table cell value" thing in the product ID to an actual ID and have changed it through iTunes connect.

    As for my buy button, this is exactly how it is currently set.

    As for my table values, these are currently how they are set.

    Im not to sure why but if a purchase is made,
    IE. the lady bug button is pressed to purchase, it will generally unlock both the lady bug and the turtle.
    However, if you purchase the turtle first then click the lady bug it will automatically unlock the lady bug.
    My guess is that both the status's are becoming purchased rather than only one.

  • Jayden.goodallJayden.goodall Posts: 15Member, PRO

    These are also my ID numbers... I though maybe it was a glitch and changed them however, the issue remains.

  • Jayden.goodallJayden.goodall Posts: 15Member, PRO

    @pHghost Any chance of having a look at the above? :)

  • pHghostpHghost London, UKPosts: 2,280Member

    Two questions:

    Why is the in-app rule turned off?

    Secondly: can you click open the expression editor for the text expression to check 'purchased?'

    Also, I personally never use the Callback as a rule requirement. Not sure if that could be an issue.

  • Jayden.goodallJayden.goodall Posts: 15Member, PRO

    So I turned it off so no one would be prompt in my testing (cause that version was an external test).

    That would be in expression text (above).
    I might give it a go without a callback and try that. :)

  • pHghostpHghost London, UKPosts: 2,280Member

    And the logic for the Turtle Skin is exactly the same, just referencing different table cells?

  • Jayden.goodallJayden.goodall Posts: 15Member, PRO

    Yeh so the turtle one is the same, its just got the different cell number (which would refer to the turtle and not the lady bug).

  • Jayden.goodallJayden.goodall Posts: 15Member, PRO

    So in the turtle one, it says 2,5 rather than 1,5.
    As shown below.

  • pHghostpHghost London, UKPosts: 2,280Member

    Yes, and the game.Saving table row is different as well.

    Are you testing the purchases on ad-hoc, testflight, or where are you seeing the results (of two being unlocked)?

    Also, I assume the two buttons on the shop scene are in separate locations, not overlapping.

  • Jayden.goodallJayden.goodall Posts: 15Member, PRO

    So I have two buttons in my actors. one for turtle and one for lady bug. The lady bug button is spawned when the lady bug selected, and the turtle button is spawned when the turtle button is selected.
    Its the exact same spawn settings though (apart from the different display picture and button).
    When im testing the game, I upload it to Itunes connect and test the game through testflight.

    The game.saving table is so that it loads to an attribute and then through to purchase.
    Although i could change it so that when the item is in state "purchase" to unlock.

  • pHghostpHghost London, UKPosts: 2,280Member

    If you are testing in TestFlight, make a display console: just a TextDisplay which will show you the state of all the actors, attributes and table values related to the purchase. Watch what they do as you make a purchase. I'm not seeing any problems from the outside like this.

    Can you possibly upload the problematic part to be looked at? Copy the project, remove the rest of the game, leave just the purchase buttons, actors and logic spawning the buttons and the related tables. If you upload it, I'll have a look.

  • supafly129supafly129 Posts: 448Member, PRO
    edited March 2017

    Keep in mind that if you are testing through TestFlight that calling the purchase table will likely automatically restore all Non-Consumables (if they were previously purchased on the itunes account you're logged into) depending on how your purchase rules are set up.

    In other words, anytime you make a purchase, the entire PurchaseTable gets filled out with "purchased", "unpurchased" etc. for each row in column 5, so any Non-Consumables you purchased in the past end up getting restored even if you weren't intentionally trying to buy it.

    So if you bought character #1 in the past with your account, buying character #2 (or making any purchase for that matter) will automatically unlock character #1.

  • Jayden.goodallJayden.goodall Posts: 15Member, PRO

    Oh! So when testing in testflight, it does an automatic restore when a re-purchase is done?
    This might explain as to why its like this then.
    Cause it did the test with the attributes on screen and when i purchase the lady bug, it automatically opens up the turtle (however, I have purchased both before).

  • Jayden.goodallJayden.goodall Posts: 15Member, PRO

    Finally got it! Thank you both so much! I appreciate all your help!

  • supafly129supafly129 Posts: 448Member, PRO

    yeah, i would maybe try testing a different itunes account that you haven't used before with your game, and if buying one character doesn't unlock the other, you should be good to go.

  • Jayden.goodallJayden.goodall Posts: 15Member, PRO

    Yeh I made a new one and tested it and it worked fine! :smiley:

  • pHghostpHghost London, UKPosts: 2,280Member

    Cool! Great insight, @supafly129!

Sign In or Register to comment.