N
Nevermore
Guest
I am working on a online game and i set alarm to count time on client every second and it was working like charm, but then i noticed that when i scale game window or move it around deskopt it does not working until i end moving or resizing window, i need to make this clock working all the time no matter if game is out of focus or someone is moving or resizing window. I spend big time on this problem and couldn't find anything online it is really frustrating.
If someone know something about fixing this here is my code from alarm 0 event please help:
If someone know something about fixing this here is my code from alarm 0 event please help:
Code:
// do every second
alarm[0] = room_speed * 1;
//seconds
if ( world_time[2] + 1 == 60){
world_time[2] = 0;
world_time[1] = world_time[1]+1;
//minutes
if ( world_time[1] + 1 == 60){
world_time[1] = 0;
world_time[0] = world_time[0]+1;
//hours
if ( world_time[0] + 1 == 24){
world_time[0] = 0;
}
else{
world_time[2] = world_time[2]+1;
}
}
else{
world_time[1] = world_time[1]+1;
}
}
else{
world_time[2] = world_time[2]+1;
}