Game types
A mode plays any multiplayer game type. Its objectives, scoring, role traits and round rules keep running alongside your script. Forge and the campaign can't be scripted.
mode in the header | Game type | game.get_game_type() | More than eight teams |
|---|---|---|---|
Slayer | Slayer | 2 | Yes |
CaptureTheFlag | Capture the Flag | 1 | No: eight teams |
Oddball | Oddball | 3 | Yes |
KingOfTheHill | King of the Hill | 4 | Yes |
Vip | VIP | 6 | Yes |
Juggernaut | Juggernaut | 7 | No: no teams |
Territories | Territories | 8 | Yes |
Assault | Assault | 9 | No: eight teams |
Infection | Infection | 10 | No: no teams |
EscalationSlayer | Escalation Slayer | 12 | No |
Keep the game type's own limits in mind, so they don't end a round your script means to go on: leave them off, or set scripted_round_end = true. A mode shows on the Megalith card, and among the variants of the game type it plays. A game type's map must have its objectives: Conquest needs Territories objectives, and a mode on Capture the Flag needs flags.
team.get_native_score() reads a team's score in the game type itself, game.get_territory_count() and team.get_territory_count() read Territories, team.get_vip() names a team's VIP, game.get_juggernaut() the Juggernaut and game.get_current_hill() King of the Hill's active hill, and object.get_territory_owner() tells who holds one. is_of_type finds a flag, a bomb or an oddball. Scores your script keeps in its own numbers, such as tickets, are separate from the scoreboard's.
