Gdevelop check for internet connection

Is there a way to test the Internet connection?

You have actions for connect to the internet, if you have no response internet or server is not up.

1 Like

Okay, can it do a true or false query?

You could try checking for the contents of the response. Set the variable to ‘false’ before doing an HTTP request. Set the HTTP respond value from the server to be ‘True’. When you do a request to the server you will either receive a ‘True’, if the connection is available, or ‘False’ if the connection timed out.

Also, note that this might introduce delays and/or lag in your game, since it seems that GDevelop is doing an “XMLHttpRequest” in synchronous mode.