Copying new table to PurchaseTable

supafly129supafly129 Member Posts: 454
edited August 2016 in Working with GS (Mac)

Anyone know if copying a newly created table to the Purchase table (same amount of columns/rows as well as product IDs) will cause problems in the long run?

For example, say I want to change rows 1-100 in column 5 of the PurchaseTable from "purchased" to empty all at once without having to do "change table cell" behavior 100 times.

Comments

  • MentalDonkeyGamesMentalDonkeyGames Member Posts: 1,276
    edited August 2016

    Why would you want to change them to empty?

    Personally, i don´t recommend modifying the purchase table in any way. No copying, no save table, no change table value... You don´t need to do that with purchase table. Everything necessary will be taken care of with the iap behaviours.

    Only thing you need to do with purchase table is put the product ID´s in, and set the boolean for consumables/non-consumables.

    Mental Donkey Games
    Website - Facebook - Twitter

  • supafly129supafly129 Member Posts: 454
    edited August 2016

    @MentalDonkeyGames I originally was doing that if a player needed to restore twice in the same session (i.e. if they reset game progress) but now that I think of it i don't think it's necessary.

    This brings me to another question: let's say i have 100 non-consumables (individual level unlocks). Is there a unified way of managing each IAP behavior, rather than having 100 separate rules of "if tablecellValue(game.PurchaseTable,row,column) = "purchased" then unlock level X"?

    This mainly becomes an issue when restoring purchases, because if the player purchased say 80 levels in the past, 80 levels would then need to be restored/unlocked all at once. Is there a simple solution to this I may be missing? Perhaps a loop of some sort?

  • supafly129supafly129 Member Posts: 454

    Looks like the Loop Over Table behavior combined with tableSearch function actually helped make this work out well

Sign In or Register to comment.