|
Server Help Community forums for Subgame, ASSS, and bots
|
Author |
Message |
resol guest Guest
Offline
|
Posted: Tue Oct 26, 2010 3:07 pm Post subject: Python Scoreboard |
|
|
|
|
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.
# 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
|
Posted: Wed Oct 27, 2010 4:29 pm Post subject: |
|
|
|
|
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 |
|
|
|
|
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
|
Software by php BB © php BB Group Server Load: 62 page(s) served in previous 5 minutes.
|