Created
February 3, 2016 07:35
-
-
Save tjone270/a5518c48435fb095fd69 to your computer and use it in GitHub Desktop.
how to tell which team scored last
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.team_gametypes = ["tdm", "ca", "ctf", "1f", "har", "ft", "dom", "ad", "rr"] | |
self.free_gametypes = ["ffa", "duel", "race"] | |
self.stored_score_red = 0 | |
self.stored_score_blue = 0 | |
def handle_round_end(self, *args, **kwargs): | |
if self.game.type_short in self.team_gametypes: | |
if self.game.red_score != self.stored_score_red: | |
self.stored_score_red = self.game.red_score | |
self.stop_sound() | |
self.play_sound("q3_audio/vo/teamgame/red_scores.wav") | |
elif self.game.blue_score != self.stored_score_blue: | |
self.stored_score_blue = self.game.blue_score | |
self.stop_sound() | |
self.play_sound("q3_audio/vo/teamgame/blue_scores.wav") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment