I'm developing a turn-base game with GameSparks service.I want to wait 10 second then change turn,but i want to count down timer in cloud code not in client device.
I tried to use theScheduler.inSeconds()
but i don't know how to sent data from module to client.
Asked
Active
Viewed 350 times
0

BehnamJef
- 29
- 6
1 Answers
0
It is not recommended to halt the execution of Cloud Code, or make it wait, as this could potentially fall over when the script times out (30 secs).
It is recommended to handle this waiting Client Side, then using event logic to verify that a set amount of time has passed.
If you need any help with this I would recommend you get in touch with the GameSparks support team, if you have not done so already, via https://support.gamesparks.net/support/home as we can discuss the requirements for your game with you in detail.
Source: I am the GameSparks Community Manager.

GameSparks_Clare
- 39
- 3
-
I want to protect my game from hackers, so I decide to implement roles in the server.however, I found a solution for my problem, thank you a lot. – BehnamJef May 13 '17 at 09:59