Sign In Register

How can we help you today?

Start a new topic
Answered

Timed event in GS

I'm making a online multiplayer strategy game and I have the following 
question:

Lets say a player constructs a building in his base and the building 
takes 8 hours to complete, the player logs out after 2 hours and closes 
the application. Because the application is closed it is unable to check 
if the construction of the building is complete and save it to 
GameSparks. But if a another player views or attacks the players base 
after the construction time has passed it needs to have the correct 
buildings. Is there a way to do a check in GameSparks to see if a 
certain amount of time has passed?


Best Answer

Hi Darryl,


The SparkScheduler might be what you are after here. It will allow you to schedule a module to run in the future. So if a player began construction you could set the scheduler to complete construction in 8 hours time. This would be handled on the server and wouldn't require the player to be online all the time. You can read more about the scheduler and its use here. Is that the kind of functionality you need ? 


Thanks,

Liam


Answer

Hi Darryl,


The SparkScheduler might be what you are after here. It will allow you to schedule a module to run in the future. So if a player began construction you could set the scheduler to complete construction in 8 hours time. This would be handled on the server and wouldn't require the player to be online all the time. You can read more about the scheduler and its use here. Is that the kind of functionality you need ? 


Thanks,

Liam


1 person likes this

Yeah it is exactly what I was looking for!


thanks for the help Liam!

Login to post a comment