Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Hi, i need this, when internet is available, then i want to show add, but how to get, that internet is on?
Try the Browser object's 'Is online' condition.
Develop games in your browser. Powerful, performant & highly capable.
I tried this, but it does not work for me :/ If i use "Is online", action work al the time, even if i am online or not. If I use inverted "Is online" action work never
It's up to the browser how it defines "online" and sometimes just being connected to a LAN counts. It might also only update it when next making a network request. See: https://developer.mozilla.org/en-US/docs/Web/API/NavigatorOnLine.onLine
If you want a more robust way to check, you need to invent your own system, such as AJAX requesting a server to see if it is reachable.