citron2010's Forum Posts

  • Can I ask how you connect the Arduinos to Construct?

  • Just looked at how some other games handle "Restore Purchase" when there's nothing to restore:

    1 of them did absolutely nothing

    4 of them do nothin except animate the "Restore Purchase" button to give some confirmation that it's been tapped.

    2 of them said "Restore successful" even though nothing was restored

    1 of them actually reported "Nothing to restore"

    I wondering whether that last one just waits for a few seconds before checking whether the product is owned?

  • Quick update to this:

    I looks like MobileIAP.Restore purchases causes "On product owned" to trigger.

    So the issue I have now is how to detect when the user clicks on "Restore purchases" but doesn't have the IAP (I only have one IAP)?

    Current flow:

    1. User clicks "Restore purchases"
    2. MobileIAP.Restore Purchases called
    3. If "Has product xxx" = true, then set global variable "IAPPurchased" = TRUE & alert user "Restore successful"
    4. If "Has product xxx" = false, alert user "Nothing to restore"
    5. "On product xxx owned", then set global variable "IAPPurchased" = TRUE & alert user "Purchase successful"

    The problem is that steps 1 to 4 all happen BEFORE "On product xxx owned" so that step 3 is never TRUE and "Nothing to restore" is always displayed.

    ("On product xxx owned" triggers either after a purchase or restore.)

    Another minor issue is distinguishing in step 4 whether the user has just purchased or restored the IAP. I can either change "Purchase successful" to just "Success" or store in a variable whether the last button pressed was "Purchase IAP" or "Restore Purchases" then set the message to be either "Purchase successful" or "Restore successful" accordingly.

  • > Am I doing something wrong or is this a bug?

    It's a mistake in your events. The "Else" means "is not on Android". So your logic will only ever show "Android" or "OtherPlatform".

    Thank you - can't believe I was so dumb. Can confirm it's working now - both in the Xcode simulator and on a real iPhone.

    Now just need to figure out how to test IAPs in TestFlight...

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I've not tried this myself, but would guess:

    1. Make the canvas global (not certain this is needed)
    2. Save snapshot
    3. Change layout
    4. Load snapshot

    construct.net/en/make-games/manuals/construct-3/plugin-reference/drawing-canvas

  • That brings back pre-iPhone memories!

    I’d start by seeing what the Keyboard object returns when a key is pressed (just numbers I’d guess). Then see what happens when you type into a Text Input object.

  • It turns out to be fraud, you have made a button to restore the purchase but put another action on it.

    When publishing goods in App store you attach a screenshot with the button to restore purchases and the moderator necessarily clicks on it, and if he does not see the necessary action in the console, he will reject your application.

    You don't have to reinvent the wheel. Just put a restore purchases action on the button and if you have one-time purchases apple will restore them.

    Makes sense - thank you - will add that and hopefully submit later today.

  • In iPhones this button should restore non consumable account purchases after reinstalling the game.

    But what does the restore purchase action actually do? When a purchase is made, On Product Owned triggers so I know to unlock features or whatever. But it's not clear if anything triggers when Restore Purchase is made. Currently I'm just checking Product Owned when the restore purchase button is clicked and not using Restore Purchase. I'm fairly close to submitting to TestFlight where IAPs can be tested, so I'll know for sure whether my method works or if I do need to call Restore Purchases.

  • Hey - thanks for reproducing and good to know I could leave the button in Android builds.

    Also, on the subject of restore purchases, do you know what the mobileIAP's restore purchases action actually does? I assumed it would be sufficient to simply check whether the product was owned. Discussed in another thread here.

    Could you explain what you mean by this:

    By the way in my archive for Xcode in the folder "pods" were not all the files had to make "pod install".

    I see a pods problem after exporting as Xcode (easily fixed - see point 2. in that post.). But I noticed that if I export as Cordova first (needed to solve another issue described in my third post in that same thread), I don't that pods issue.

  • Hi,

    using platforminfo - Is on iOS condition, but it's not working.

    Have tried a simulator on Xcode and a real iPad and iPhone.

    Works fine for Android (using Bluestacks emulator).

    This is my code - any iOS device sets "platform" to "OtherPlatform"

    Am I doing something wrong or is this a bug?

    As I'm only targeting Android and iOS for now, I can set it to "iOS" if it's not Android as a workaround. But will need some other way to determine this if/when I target other platforms (I need to know whether it's iOS or not in order to show "Restore Purchases" which is only needed on iOS).

  • I have another question!

    In the manual for MobileIAP, it lists "Restore Purchases" as one of the plugin's actions. But what does that actually do?

    As I started working through implementing IAP's, the obvious (at least to me) way to implement restoring purchases was simply by checking "Product Owned". But then I noticed that entry in the manual.

  • Set Autoplay property to "preload"

    Use "Set playback time" action to scrub.

    Note I've not tried this myself, just pulled it from the manual:

    construct.net/en/make-games/manuals/construct-3/plugin-reference/video

  • It's stored on the servers of the marketplace (Google Play or Appstore). I don't know if the device needs to be online.

    You can store the purchases in the app, but you still need to check if the product is owned when the app is launched for the first time - in case the product has been purchased before on a different device, or the app was re-installed.

    Also, people can refund the purchase. So it's still recommended to check if the product is owned occasionally.

    Thanks for the clarification - I'd completely missed the case where a purchase had been made on another device! I'll store it locally to enable offline play but also try to check on every session.

  • Hi,

    From the manual:

    On Product Owned

    Triggers when a specific product becomes owned. This triggers both after a first purchase for it, and on startup when the product was previously purchased, allowing easily identifying if the purchased product can be made use of.

    Where is the "owned" state stored? I was expecting to have to store it myself.

    Does the device need to be online?

    Thanks.

  • > Maybe different animation frames? One with dirt and one without?

    No, the task is to gradually erase the sprite.

    It might be possible using the Drawing Canvas:

    construct.net/en/make-games/manuals/construct-3/plugin-reference/drawing-canvas

    Looks like you can use "paste object" to paste the currently picked sprite to the canvas.

    Then I guess you can erase over it using by drawing a small circle with 0% opacity at the mouse point.