[Plugin] Ping

Post your completed addons to share with the community

Post » Fri Feb 24, 2012 12:58 am

Very basic plugins, basically add two events:

Is connected
Is not connected

They return true if the user has internet access or false if not (and the other way around) trough: navigator.onLine

I hope it would be helpful to anyone, it should be helpful for offline app on the chrome web store or mobile.

https://github.com/0plus1/Construct2---Ping
B
29
S
9
G
6
Posts: 525
Reputation: 8,294

Post » Fri Feb 24, 2012 1:39 pm

I guess it is the same as the Browser plugin "Is online", "On went online" and "On went offline" conditions ?

If so, prefer using the browser plugin.
I won't list this plugin on the list for now as it's better to use the built-in plugin in that case.

If the functions provided by your plugin are different than those of the browser object, then I'll list it.Kyatric2012-02-24 13:40:05
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Sat Feb 25, 2012 11:21 am

Yes, it's the same more or less, the only difference is that I added an isOffline condition, not he went offline, if he started offline which was lacking from the browser plugin and I needed it.
B
29
S
9
G
6
Posts: 525
Reputation: 8,294

Post » Sat Feb 25, 2012 12:23 pm

Well, "is Offline" is an inverted "Is online" condition.

Not listing the plugin, sorry.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Sat Feb 25, 2012 1:13 pm

No problem Kyatric, no problem at all, that teaches me to read the manual, I didn't know you could invert an action :-(

Sorry for wasting your time
B
29
S
9
G
6
Posts: 525
Reputation: 8,294

Post » Sat Feb 25, 2012 2:05 pm

Oh you're not wasting my time by no mean.
I feel more like you might have wasted a bit of yours.

On the way though you saw how to put up a custom plugin, and learnt a few others things about C2 so I guess it's not totaly wasted/lost.

The reason I prefer not listing the plugin is to prevent other users of "making the same mistake".
Plugins are cool to help out with a lots of things, but sometime, using a thrid-part plugin you might miss an already built-in feature and "important mechanism" (I think that now that you know you can invert conditions, a lot of new designs and patterns are crossing your mind).

Sorry if I sounded a bit stiff, it wasn't intended and I'm always pleased to see new plugins and new plugins builders in this part of the forum.
It's just in that case that "a better solution" already exists and is an important mechanism of C2 I consider ppl shouldn't be missing.


Kyatric2012-02-25 14:07:12
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Sat Feb 25, 2012 6:16 pm

No don't worry, I learned a lot and I'll be doing plugins, actually I already did other plugins just to invert actions, can you believe it?
:-)

I'm just glad that my current project didn't require that many inversions :-P

Anyway thanks, I hope to post something more useful in the future :-)
B
29
S
9
G
6
Posts: 525
Reputation: 8,294


Return to Completed Addons

Who is online

Users browsing this forum: Colludium and 0 guests