Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Game Timers

 
Post new topic   Reply to topic Printable version
 View previous topic  Changing LinkedList to a Target Post :: Post Regions  View next topic  
Author Message
Animate Dreams
Gotta buy them all!
(Consumer whore)


Age:37
Gender:Gender:Male
Joined: May 01 2004
Posts: 821
Location: Middle Tennessee
Offline

PostPosted: Tue Apr 10, 2007 3:15 pm    Post subject: Game Timers Reply to topic Reply with quote

I just found something that looks cool. I was looking through game.h when I found this callback:
Code: Show/Hide
/** this callback called when the game timer expires. */
#define CB_TIMESUP "timesup"
/** the type of CB_TIMESUP
* @param arena the arena whose timer is ending
*/
typedef void (*GameTimerFunc)(Arena *arena);

I was just using a normal timer from the mainloop module for an event, but if there is a timer specifically for events, I would of course rather use that. I looked around in the source to find more about game timers, but all I found was gametimer.c, which seems to be more concerned with in-game commands than functions. All I want to do is start a timer for the game, which will call a function when it ends to stop the game. But I'm assuming that if I used a gametimer, I could just use the CB_TIMESUP to handle stopping the game. But, it kind of looks like gametimer wasn't really created for this, in which case I should just ignore this and just use a normal timer. So, can anyone give me some information on game timers?
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address MSN Messenger
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Tue Apr 10, 2007 3:50 pm    Post subject: Reply to topic Reply with quote

I think CB_TIMESUP is just for the ?timer and TimedGame setting.

I think in subgame if TimedGame is on at the end stats are displayed and scores are reset, last time I checked asss does not do this. Plus it ends with a ding instead of a hallellula.

I would just make my own timers for my events and leave CB_TIMESUP alone (especially since gametimer has no interface).
_________________
ss news
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 36 page(s) served in previous 5 minutes.

phpBB Created this page in 0.473351 seconds : 27 queries executed (89.5%): GZIP compression disabled