Player

Player variables refer to players that are participating in the match, or that have participated in the match and since quit. Note that a "player" is distinct from a "player model," or "biped:" if the game has just started and you're still selecting a loadout, then you (the player) still exist even though you're not physically present on the map (you have no biped).

There are eight global player variables, numbered from 0 to 7, which can be accessed as global.player[n].

This type contains nested variables. There are 8 nested numbers, 4 nested objects, 4 nested players, 4 nested teams, and 4 nested timers available.

Properties

biped

The player's current biped.

money

The player's money, to spend on requisitions as part of an unimplemented gameplay system.

rating

The player's Arena rating.

score

The player's current score.

script_stat[n]

The value of a scripted Post-Game Carnage Report stat for this player.

team

The player's owner team.

Accessors

frag_grenades

The player's current frag grenade count.

plasma_grenades

The player's current plasma grenade count.

Member conditions

assisted_kill_of

Checks whether one player assisted another in killing a third.

is_elite

Checks whether a player's current species is Elite.

is_fireteam_leader

This function always returns false.

is_monitor

Checks whether a player's current species is Monitor.

is_not_respawning

Checks whether a player is not respawning.

is_spartan

Checks whether a player's current species is Spartan.

killer_type_is

Check what killed a player.

Member actions

add_weapon

Give a weapon to a player.

apply_traits

Apply a set of player traits to a player for the current tick.

force_into_vehicle

Force a player into a vehicle if any seat is available.

get_armor_ability a.k.a. try_get_armor_ability

Identify the player's current Armor Ability.

get_button_press_duration a.k.a. get_button_time

MCC-exclusive: Detect whether a player is holding a given button down. Intended for debugging purposes only.

get_crosshair_target

Identify the object that the player is aiming at, if that object is changing the player's reticle color.

get_fireteam

Returns the index of the fireteam that a player is on.

get_scoreboard_pos

Get a player's position on the scoreboard.

get_spree_count

Get the number of players that someone has killed without dying.

get_vehicle a.k.a. try_get_vehicle

Identify the vehicle that a player is in.

get_weapon a.k.a. try_get_weapon

Identify the player's current weapon.

increment_req_money_by

A development leftover related to a scrapped Requisition system.

record_griefer_penalty

The specific function of this action is not known. Presumably it has something to do with keeping track of bad behavior in-game.

set_biped

Revoke control of a player's current biped, and grant control of another one.

set_co_op_spawning

Control whether a player uses co-op spawning.

set_fireteam

Sets a player's current fireteam index.

set_loadout_palette

Sets which loadout palette a player can select loadouts from.

set_objective_allegiance_icon a.k.a. set_round_card_icon

Change the round card's icon.

set_objective_allegiance_name a.k.a. set_round_card_text

Change the round card's icon caption.

set_objective_text a.k.a. set_round_card_title

Change the round card's description text.

set_primary_respawn_object

This function appears to set a player's default respawn object, when co-op spawning is enabled.

set_req_purchase_modes

A development leftover related to a scrapped Requisition system.

set_requisition_palette

A development leftover related to a scrapped Requisition system.

set_respawn_vehicle

MCC-exclusive: Automatically spawn players inside of vehicles, without having to manually create vehicles and force players into them.

set_vehicle_spawning_enabled

MCC-exclusive: Although intended to let you control whether players spawn in vehicles or not, this function doesn't appear to actually do anything.

try_get_death_damage_mod a.k.a. get_death_damage_mod

Identify the modifier for the damage that killed this player.

try_get_death_damage_type a.k.a. get_death_damage_type

Identify the type of damage that killed this player.

try_get_killer a.k.a. get_killer

Identify the player who killed this player.