Browser Object

  • Been using the browser object to detect "Is online" and have inverted it with the "X" so I have "Browser X is online" and it does not work anymore.

    Was wondering if anything had changed with the browser object ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Try 'else' ?

    Is online

    Empty sub

    Else

  • Heh, Thanks it works perfect.

  • Is online

    Empty sub

    Else

    Why empty sub though?

  • Need a condition to pair with the 'else'. An empty is just the same as an 'every tick". So it is a condition. But one that runs nothing (no evalution, no actions), in this case just a kinda placeholder to be able to place the 'else'.

  • Hmm scrub that.

    Actually, it only works when testing in Chrome or IE

    When I export to apk it thinks it's offline both when I try it your way and when I try it mine.

    I assume something is not working in the browser wrapper.

    I've tried adding website address to the allow intent, just in case.

    Looks like it's back to my old way of testing e.g. grab a text file from my server, grab the value within and assign it to a global variable, check the global variable is not zero otherwise you are offline message.

  • When I export to apk it thinks it's offline both when I try it your way and when I try it mine.

    Since then your game is in an offline package, I think this works just as intended.

  • My game needs to be online as it pulls data files and images from a website.

    If there is no data connection I need to let the user know as the game will not work without it.

    For me, the browser object does not work for testing "is online" when exported to apk so I have to revert to other means as described in my previous post.

  • ...For me, the browser object does not work for testing "is online" when exported to apk so I have to revert to other means as described in my previous post.

    Sorry, I think I misunderstood you. Since it should work imo, maybe it worth to file a bug report about this.

  • Some days I'm not very good at explaining lol

    Thanks

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)