I thought this was a handy little snippet to post.
Syntax: Select all
from entities.entity import Entity
from events import Event
WIN_CONDITION = 2
"""CSS:
0 TERRORIST "Target_Bombed"
1 CT "VIP_Escaped"
2 TERRORIST "VIP_Assassinated"
3 TERRORIST "Terrorists_Escaped"
4 CT "CTs_PreventEscape"
5 CT "Escaping_Terrorists_Neutralized"
6 CT "Bomb_Defused"
7 CT "CTs_Win"
8 TERRORIST "Terrorists_Win"
9 World "Round_Draw"
10 CT "All_Hostages_Rescued"
11 CT "Target_Saved"
12 TERRORIST "Hostages_Not_Rescued"
13 CT "Terrorists_Not_Escaped"
14 TERRORIST "VIP_Not_Escaped"
15 World "Game_Commencing"
16 World "UNKNOWN"
"""
def fire_win(condition):
info_map_parameters = Entity.find_or_create("info_map_parameters")
info_map_parameters.call_input('FireWinCondition', condition)
@Event("player_jump")
def player_jump(game_event):
fire_win(WIN_CONDITION)