ctf_controller
The CTF controller acts as a manager for an individual CTF game, each CTF game should have its own, the controller should handle all game-wide functionality.
Vars | |
auto_restart | When this CTF match ends should it automatically restart. |
---|---|
barricades | List of all barricades that have been destroyed during this CTF game. |
control_points | List of all control points used by the game, if they exist. |
ctf_enabled | Whether or not this CTF game is running. |
game_id | The ID associated with this CTF game. |
instagib_mode | Weather or not instagib mode has been enabled. |
points_to_win | How many points a team needs to win. |
respawn_cooldown | How long till players who die can respawn. |
teams | List of all team_datums participating in this game. |
victory_rejoin_text | The text shown once this CTF match ends. |
Procs | |
add_player | Adds a player and a reference to their player component to the corresponding team. |
add_team | Add an additional team to the current CTF game. |
capture_flag | Called when a flag is captured by the provided team. Messages players telling them who scored a point and if points are high enough declares victory. |
clear_control_points | Marks all control points as neutral, called when a CTF match ends. |
control_point_scoring | Called when points are scored at a control point. Messages players telling them when a team is half way to winning and if points are high enough declares victory. |
get_all_players | Returns a list of all players in all teams. |
get_player_component | Returns a reference to a players component (if it exists) when provided with a player's ckey |
get_players | Returns a list of all players in the provided team. |
get_points | Returns the current amount of points the provided team has. |
message_all_teams | Sends a message to all players in all CTF teams in this game. |
remove_team | Called when a spawner is deleted, removes the team from this datum. |
respawn_barricades | Respawns all barricades destroyed during the current CTF game, called when the match ends. |
setup_rules | Some CTF maps may require alternate rulesets, this proc is called by the medisim spawners and CTF maploading. |
team_valid_to_join | Identifies if the provided team is a valid team to join for the provided player. |
toggle_instagib_mode | Enables and disables instagib mode in this game. During instagib mode respawns are faster, players are faster and people die faster (instant). |
unload_ctf | Unloading CTF removes the map entirely and allows for a new map to be loaded in its place. |
victory | Ends the current CTF game and informs all players which team won. Restarts CTF if auto_restart is enabled. |
Var Details
auto_restart
When this CTF match ends should it automatically restart.
barricades
List of all barricades that have been destroyed during this CTF game.
control_points
List of all control points used by the game, if they exist.
ctf_enabled
Whether or not this CTF game is running.
game_id
The ID associated with this CTF game.
instagib_mode
Weather or not instagib mode has been enabled.
points_to_win
How many points a team needs to win.
respawn_cooldown
How long till players who die can respawn.
teams
List of all team_datums participating in this game.
victory_rejoin_text
The text shown once this CTF match ends.
Proc Details
add_player
Adds a player and a reference to their player component to the corresponding team.
add_team
Add an additional team to the current CTF game.
capture_flag
Called when a flag is captured by the provided team. Messages players telling them who scored a point and if points are high enough declares victory.
clear_control_points
Marks all control points as neutral, called when a CTF match ends.
control_point_scoring
Called when points are scored at a control point. Messages players telling them when a team is half way to winning and if points are high enough declares victory.
get_all_players
Returns a list of all players in all teams.
get_player_component
Returns a reference to a players component (if it exists) when provided with a player's ckey
get_players
Returns a list of all players in the provided team.
get_points
Returns the current amount of points the provided team has.
message_all_teams
Sends a message to all players in all CTF teams in this game.
remove_team
Called when a spawner is deleted, removes the team from this datum.
respawn_barricades
Respawns all barricades destroyed during the current CTF game, called when the match ends.
setup_rules
Some CTF maps may require alternate rulesets, this proc is called by the medisim spawners and CTF maploading.
team_valid_to_join
Identifies if the provided team is a valid team to join for the provided player.
toggle_instagib_mode
Enables and disables instagib mode in this game. During instagib mode respawns are faster, players are faster and people die faster (instant).
unload_ctf
Unloading CTF removes the map entirely and allows for a new map to be loaded in its place.
victory
Ends the current CTF game and informs all players which team won. Restarts CTF if auto_restart is enabled.