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
<c> flagutil

 
Post new topic   Reply to topic Printable version
 View previous topic  <C> MultiNews (1.4.4) Post :: Post <C> Sqlite  View next topic  
Author Message
D1st0rt
Miss Directed Wannabe


Age:36
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Sat Jul 25, 2009 12:15 pm    Post subject: <c> flagutil Reply to topic Reply with quote

Couple of modules for doing things with flags: http://bitbucket.org/d1st0rt/flagutil

flagfreeze lets you save and restore the state of the flags in an arena, flagtime is the basis for scoring we use in the Hyperspace flag control event.
_________________

Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Hakaku
Server Help Squatter


Joined: Apr 07 2006
Posts: 299
Location: Canada
Offline

PostPosted: Sat Jul 25, 2009 1:14 pm    Post subject: Reply to topic Reply with quote

Nice work. If someone is carrying a flag while you use decide to freeze the state of the flags, will the flag just be dropped if you restore the previous state? If so, is it neutralized or does it become owned?

And I'm not quite sure I understand the flagtime, does it just keep track of how long a flag has been dropped? What exactly do you mean by adding one second per flag to a player/team every second?
Back to top
View users profile Send private message Add User to Ignore List Send email
D1st0rt
Miss Directed Wannabe


Age:36
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Sat Jul 25, 2009 4:31 pm    Post subject: Reply to topic Reply with quote

If someone is carrying a flag when you stored the state and you then restore it later after they have dropped it, they will find themselves carrying a flag again. There might be some issues if a player is carrying a flag when it's stored and they disconnect before you restore, but I haven't really messed around with it that much.

Ok, the way flag time works is that every second, it checks to see which flags are dropped. If a flag is dropped it gives a +1 to the player that dropped it. So for example if a player has dropped 3 flags, every second they will get +3 added to their "flag seconds". The FlagTeam structure also contains the total of all accumulated flag seconds for that team since it was last cleared. The "breakdown" hashtable keeps track of who on that team is responsible for how much, and keeps incrementing even if they disconnect.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Hakaku
Server Help Squatter


Joined: Apr 07 2006
Posts: 299
Location: Canada
Offline

PostPosted: Sat Jul 25, 2009 7:08 pm    Post subject: Reply to topic Reply with quote

Thanks for the detailed explanation. What happens if you restore the state of the flag and the player is no longer there, he's on a different side of the map, or he changed teams?
Back to top
View users profile Send private message Add User to Ignore List Send email
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Custom Projects 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: 673 page(s) served in previous 5 minutes.

phpBB Created this page in 0.488556 seconds : 29 queries executed (82.1%): GZIP compression disabled