The attribute Callback/firstcontact that you get by contacting the server is initialized to 0. If the command succeeds, it will be set to 1, and if it fails, it will be set to -1.
You could have a boolean in your project like
Internet active = false
if self.firstcontact is 1
->change boolean to true
if self.firstcontact -1
->change boolean to false
and make them able to continue playing based on that boolean
Use the In App Purchase - Request Purchase Data behaviour. It won't be a guaranteed check, as Apple's servers could be down or not responding, but it's probably the simplest way.
@Hopscotch said: @neo1998x you would have to use some back-end server, send a request and see if it gives a response.
You can use a service like ours (signature below) or set up your own.
Regarding the ads, using too many too often will make your users unhappy before Chartboost gets unhappy. The frequency should not be too high.
Well, it's not about happy or unhappy.
I'm about to use it for reward, like 1 extra view of ad you got 5 gems.
But I'm not sure on the ChartBoost side they allow to do it.
Players will be certainly happy.
The attribute Callback/firstcontact that you get by contacting the server is initialized to 0. If the command succeeds, it will be set to 1, and if it fails, it will be set to -1.
You could have a boolean in your project like
Internet active = false
if self.firstcontact is 1
->change boolean to true
if self.firstcontact -1
->change boolean to false
and make them able to continue playing based on that boolean
Thank you! And thank you @Armelline .
I'll try it out later on.
i am not sure if it actually works, atleast with the external server(app formative)
It works in the simulator on the mac by turning off my internet it switches to "no internet connection" scene
by turning it back on it switches back to main screen
but on the mobile version it remains in the no internet connection even if there is internet. (wlan)
@BigDave your example is fine, but using a change scene in this case will not work.
The networking behavior set the call back attribute to 1 only after it completed its operation successfully. In a mobile environment this can take a few milliseconds, long enough for the rule first to trigger the -1 state, thus changing scene and no longer registering the success state of 1.
It is better to call the networking behavior, then only test for a positive response (1) after a delay of about 0.5 seconds to accommodate for slow mobile traffic.
Comments
There is no way in Gamesalad to check if the device is connected to the internet.
@neo1998x you would have to use some back-end server, send a request and see if it gives a response.
You can use a service like ours (signature below) or set up your own.
Regarding the ads, using too many too often will make your users unhappy before Chartboost gets unhappy. The frequency should not be too high.
@neo1998x
yes use appformative for that.
They also have an easy tutorial
http://www.appformative.com/implementation_gamesalad_thebasics.mox
The attribute Callback/firstcontact that you get by contacting the server is initialized to 0. If the command succeeds, it will be set to 1, and if it fails, it will be set to -1.
You could have a boolean in your project like
Internet active = false
if self.firstcontact is 1
->change boolean to true
if self.firstcontact -1
->change boolean to false
and make them able to continue playing based on that boolean
Use the In App Purchase - Request Purchase Data behaviour. It won't be a guaranteed check, as Apple's servers could be down or not responding, but it's probably the simplest way.
@Armelline
oh true forgot about that
Well, it's not about happy or unhappy.
I'm about to use it for reward, like 1 extra view of ad you got 5 gems.
But I'm not sure on the ChartBoost side they allow to do it.
Players will be certainly happy.
Thank you! And thank you @Armelline .
I'll try it out later on.
@neo1998x
i am not sure if it actually works, atleast with the external server(app formative)
It works in the simulator on the mac by turning off my internet it switches to "no internet connection" scene
by turning it back on it switches back to main screen
but on the mobile version it remains in the no internet connection even if there is internet. (wlan)
@BigDave your example is fine, but using a change scene in this case will not work.
The networking behavior set the call back attribute to 1 only after it completed its operation successfully. In a mobile environment this can take a few milliseconds, long enough for the rule first to trigger the -1 state, thus changing scene and no longer registering the success state of 1.
It is better to call the networking behavior, then only test for a positive response (1) after a delay of about 0.5 seconds to accommodate for slow mobile traffic.
hi dude, i'm glad to tell you i have a solution and it works because i've already tried on my project.
Just use Networking behavior send a table to your server. follow this tutorial http://help.gamesalad.com/gamesalad-cookbook/7-using-pro-features/7-05-networking-behaviors-2/
it's quit simple. Only thing you need is a server
The simplest solution is what @Armelline saied:
Use iAP request. It just works fine for me.