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
Python Scoreboard

 
Post new topic   Reply to topic Printable version
 View previous topic  damage (binaries only) Post :: Post Python Spree  View next topic  
Author Message
resol guest
Guest


Offline

PostPosted: Tue Oct 26, 2010 3:07 pm    Post subject: Python Scoreboard Reply to topic Reply with quote

I was wondering if it was possible to make a python module that could keep score, just turning on objects.

Although, my zone is set up for CTF. I noticed in the terminal, things like..


D <fg_ctf> {0} [resol] scores a capture

I <fg_ctf> {0} game over. freq 1 wins (caps=3)

So basically, just not really sure how to start... I know its probably very simple.

Code: Show/Hide

# scoreboard by: resol 10-10

from asss import *

objs = get_interface(I_OBJECTS)
chat = get_interface(I_CHAT)

#read scoring from fg_ctf (in chat?) and toggle objects
def MSG_ARENA(arena):
   arena. = (arena.sb + 1)
   return = none

#when flag game is reset, toggle objects to make sb read 0
def CB_FLAGRESET

def mm_attach(arena):
   arena.sb_ref1 = reg_callback(MSG_ARENA, arena)
   arena.sb_ref2 = reg_callback (CB_FLAGREST, arena *a, int freq, int points)

def mm_detach(arena):
   arena.sb_ref1 = None
   arena.sb_ref2 = None
Back to top
Guest



Offline

PostPosted: Wed Oct 27, 2010 4:29 pm    Post subject: Reply to topic Reply with quote

So another option is maybe to edit the source for fg_ctf to toggle the images.

http://toktok.sscentral.com/files/asss-fg_ctf-1.9.zip

It only needs to toggle 8 images.

2 for when the flag game resets, which with both be 0's

Then toggle the other images on team 1 and 2 captures.
Back to top
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: 62 page(s) served in previous 5 minutes.

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