citron2010's Forum Posts

  • 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.

  • Thanks for this very instructive topic !

    So you gave up xcode export to cordova export ?

    In tour second post, you write :

    > I got Cordova installed

    >

    > Then cordova prepare (had to install several dependencies to get this to work)

    Could you detail the whole install process including the 'several dependancies' ?

    I'll in the process of making my own app in a few weeks and your progress are veray useful to me. thanks !

    Hi Laurent. Yes, I need to hide the home bar indicator and the only way to do this is to export to Cordova then use the Cordova plugin from the Github repo before completing the build (then importing into Xcode).

    When you run cordova prepare it warns which dependencies are missing and gives commands to install them - I can't remember exactly but write here if you get stuck and I'll try to help.

  • Just to follow up on my progress. I've been testing on real devices using Xcode but decided to try the simulator and tried an iPhone 15 where I noticed the "Home indicator bar" so searched on how to hide it and came across this post:

    https://www.construct.net/en/forum/construct-3/how-do-i-8/include-cordova-plugin-172165

    Which lead to these instructions:

    https://www.construct.net/en/tutorials/building-mobile-apps-locally-21

    I got Cordova installed

    Then cordova prepare (had to install several dependencies to get this to work)

    cordova requirements showed no issues

    cordova build failed with "Value for SWIFT_VERSION cannot be empty"

    Figured out that I needed to open /platforms/ios/<project name>.xcworkspace, go to Build Settings and change "Swift Language Version" from "Unspecified" to "Swift 4.2" (similar to above post)

    cordova build succeeded so reopened the .xcworkspace file again and managed to test the app OK again.

    Then realised I'd not read that original post thoroughly and hadn't installed:

    github.com/chipbell4/cordova-plugin-hide-home-indicator

    (or updated config.xml to include a reference to it!)

    Once that was installed and I'd updated config.xml, cordova prepare and cordova requirements ran OK

    But cordova build failed with the same Swift version error plus another "'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.2.99" error. So back to the xcworkspace file in Xcode to fix the Swift version error again. Haven't needed to fix the other error yet - the project's building OK on the simulator.

    And the result? I think it's working - I'm using the mouse to simulate clicks and I think iOS shows the indicator bar when it detects mouse activity. I can also control my game with a keyboard in which case the bar isn't show - so I'm hoping that's the case when using a real device with touch.

    Maybe a "Hide home indicator" option in the build settings? (Godot has had this for a while).

    Also wondering whether the build process needs updating to address some of the other issues I've described in this thread?

  • Not sure if C2 can do this, but C3 can - see the "Load image from URL" section here: construct.net/en/make-games/manuals/construct-3/plugin-reference/sprite

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Maybe different animation frames? One with dirt and one without?

  • Not sure, but adding the "no save" behaviour to the object the timer belongs to might work.

    construct.net/en/make-games/manuals/construct-3/behavior-reference/no-save

    Otherwise, store everything in global variable, or, if you need data to persist between restarts, you'll need to write each value out to local storage individually. If you have many parameters, storing them in a dictionary first then writing that out to local storage simplifies things.

  • Try going to chrome://flags in Chrome, search for "dark mode", set that to "enabled".

    Works for me in Windows although the contrast between selected/unselected is maybe now a little too low.

  • This thread might help - I wanted to calculate where a projectile would land but you know where you want it to land, so you could use the formula to calculate the x and y velocity you would need to give to the projectile to make it land where you want:

    construct.net/en/forum/construct-3/how-do-i-8/help-calculate-range-179892

  • Just an update to 3. above - if I export a new, empty project to Xcode, and view Assets.xcassets, it shows that it's using the default Cordova icons and not picking up the C3 icons that are present in a new project.

    It's fairly easy to fix - I just deleted all the icons and then uploaded a 1024x1024 icon for and set iOS = "All Sizes" in the dropdown.

  • Fixed my issue by applying a zero force if the object is sleeping. This first appeared when I started my current project in C2 years ago. Thought C3 had fixed it, but not completely. Fixed now though - I'm delighted!