cs_script API
Every declaration in cs_script/point_script, the module a point_script entity's JavaScript imports. It is generated from Valve's own point_script.d.ts (content/csgo_addons/cs_script_demo/maps/scripts/point_script.d.ts in the Workshop Tools), so the docs below are Valve's. Scripts run as es2022. New to cs_script? Start with Getting started. A typings file with every Hammer classname, input and output is on the codegen schemas page, and API changes between builds show up in the changelog.
CS2 build 27045800 · Steam date 2026-11-30 · platform windows-x86_64 · schema format 2.2 · d.ts sha256 20a4fcd50eac
Valve's module notes
`"cs_script/point_script"` is the module provided to scripts loaded for point_script entities. # Setup: - Create a JavaScript file (.js) that imports this module. - See `hello.js` for an example. - Create a point_script entity in your map and set its cs_script field to reference your JavaScript file as a vjs asset. - See example addon cs_script_demo. There is a point_script entity in the cs_script_demo.vmap named "hello_cs_script" that runs `hello.js`. There are a handful of other examples as well. # Execution: - The compiled version of your script (.vjs_c) will be loaded during map load. - When the point_script entity is spawned it will execute all code at the top level scope of your script. - Register callbacks on `Instance` to setup code that executes at various times throughout the lifetime of the map. - A function passed to `Instance.OnActivate` will be invoked when the point_script entity is activated. - A function passed to `Instance.OnPlayerJump` will be invoked when any player in the map jumps. # Tips: - Entity variables are stable. Two variables referring to the same entity will be reference equals (===). - Extra values attached to an entity variable will still be there if the variable is fetched again. - A map can have multiple point_script entities. Each script will run with its own Instance, set of globals, and set of entity variables. # Tools Mode: - In tools mode, saving changes to your script will recompile your file, clear all registered callbacks, and re-run the top level scope of your script. - Global variables and instances of entity variables will persist across reloads. - Beware. This is an avenue for holding references to code from previous iterations of your script. This is only a concern in tools mode. - See `Instance.OnScriptReload` for a tool to handle edge cases around reloading.
Exports
| Export | Type |
|---|---|
Instance | IPointScript |
Console | IConsole |
GameRules | IGameRules |
Entities | IEntities |
Hooks
Callbacks registered on Instance. cs_script has no generic game-event listener, so these 41 hooks are the whole set of game moments a script can react to. The Game event column names the event from the game-event registry that reports the same moment, for readers coming from server plugins or demo parsing. It is a pairing by name and documentation (docs/overlays/cs_script.yml), marked unverified until someone confirms it in game.
| Hook | Callback | Game event | Description |
|---|---|---|---|
OnScriptReload | OnScriptReload<T>(config: { before?: () => T, after?: (memory: T) => void }): void | Called in Tools mode when the script is reloaded due to changes. The before callback will be invoked before pre-load teardown. The after callback will be invoked after the new script is evaluated and will be passed the return value of the before callback. | |
OnActivate | () => void | Called when the point_script entity is activated | |
OnScriptInput | (inputData: { caller?: Entity, activator?: Entity }) => void | Called when input RunScriptInput is triggered on the point_script entity with a parameter value that matches name. | |
OnPlayerConnect | (event: { player: CSPlayerController }) => void | unverified | Called when a client finishes the initial connection handshake with the server. |
OnPlayerActivate | (event: { player: CSPlayerController }) => void | unverified | Called when a client finishes loading and is ready to spawn. |
OnPlayerDisconnect | (event: { playerSlot: number }) => void | unverified | Called when a client disconnects from the server. |
OnPlayerReset | (event: { player: CSPlayerPawn }) => void | unverified | Called when a player respawns, changes team, or is placed back at spawn due to a round restart Also fires on a team change and on a round-restart respawn. |
OnBotControl | (event: { controller: CSPlayerController }) => void | Called when a player takes or releases control of a bot. | |
OnPlayerTeamChanged | (event: { player: CSPlayerPawn, oldTeam: number }) => void | unverified | Called when a player changes team |
OnRoundStart | () => void | unverified | Called when a new round begins |
OnRoundEnd | (event: { winningTeam: number, reason: CSRoundEndReason }) => void | unverified | Called when a team wins a round |
OnBeginRoundRestart | () => void | unverified | Called at the start of cleanup for a round restart |
OnBombPlantStart | (event: { planter: CSPlayerPawn }) => void | unverified | Called when a player starts planting their c4 |
OnBombPlantAbort | (event: { planter: CSPlayerPawn }) => void | unverified | Called when a player aborts planting their c4 |
OnBombPlant | (event: BombPlantEvent) => void | unverified | Called when a player plants their c4 |
OnBombDefuseStart | (event: { plantedC4: CSPlantedC4 }) => void | unverified | Called when a player starts defusing a c4 |
OnBombDefuseAbort | (event: { plantedC4: CSPlantedC4 }) => void | unverified | Called when a player aborts defusing a c4 |
OnBombDefuse | (event: BombDefuseEvent) => void | unverified | Called when a player defuses a c4 |
OnBombExplode | (event: { plantedC4: CSPlantedC4 }) => void | unverified | Called when a c4 explodes |
OnHostagePickUpStart | (event: { hostage: CSHostage }) => void | none | Called when a player starts picking up a hostage |
OnHostagePickUpAbort | (event: { hostage: CSHostage, player: CSPlayerPawn }) => void | none | Called when a player aborts picking up a hostage |
OnHostagePickUp | (event: { hostage: CSHostage }) => void | unverified | Called when a player finishes picking up a hostage |
OnHostageDrop | (event: { hostage: CSHostage, dropper: CSPlayerPawn }) => void | unverified | Called when a carried hostage is dropped without being rescued |
OnHostageRescue | (event: { hostage: CSHostage }) => void | unverified | Called when a hostage reaches a rescue zone |
OnHostageKill | (event: { hostage: CSHostage, attacker?: CSPlayerPawn }) => void | unverified | Called when a hostage is killed |
OnModifyPlayerDamage | (event: ModifyPlayerDamageEvent) => ModfiyPlayerDamageResult | void | none | Called immediately before a CSPlayerPawn takes damage to armor and health. Called after hitgroup modifications are applied such as headshot multiplier. This won't be called if the player would take no damage. Such as if they're frozen or invulnerable or if friendly fire would disable the damage. Runs before damage is applied, so no event exists yet; player_hurt follows it. |
OnPlayerDamage | (event: PlayerDamageEvent) => void | unverified | Called when a player has taken damage. |
OnPlayerKill | (event: { player: CSPlayerPawn, inflictor?: Entity, attacker?: Entity, weapon?: CSWeaponBase }) => void | unverified | Called when a player dies. inflictor, attacker and weapon will match the damage event that caused the kill. |
OnPlayerJump | (event: { player: CSPlayerPawn }) => void | unverified | Called when a player jumps off the ground. |
OnPlayerLand | (event: { player: CSPlayerPawn }) => void | none | Called when a player hits the ground while falling. |
OnPlayerChat | (event: { player?: CSPlayerController, text: string, team: number }) => void | unverified | Called when a player sends a chat message. team will match they player's team if the message was sent to team chat. |
OnPlayerPing | (event: { player: CSPlayerController, position: Vector }) => void | unverified | Called when a player pings a location. |
OnGunReload | (event: { weapon: CSWeaponBase }) => void | unverified | Called when a gun is reloaded. |
OnGunFire | (event: { weapon: CSWeaponBase }) => void | unverified | Called when a gun emits bullets. A shotgun will only trigger this once when emitting multiple bullets at once. |
OnBulletImpact | (event: { weapon: CSWeaponBase, position: Vector, hitEntity?: Entity }) => void | unverified | Called when a bullet hits a surface. Penetrations can cause a single bullet to trigger multiple impacts. This will be called for all impacts of a bullet before any player damage events are called. |
OnWeaponDrop | (event: { weapon: CSWeaponBase, dropper: CSPlayerPawn }) => void | unverified | Called when a weapon is dropped. There is no weapon_drop event; item_remove is the nearest and also fires when an item is removed for other reasons. |
OnWeaponPickup | (event: { weapon: CSWeaponBase }) => void | unverified | Called when a weapon is picked up. |
OnGrenadeThrow | (event: { weapon: CSWeaponBase, projectile: CSGrenadeProjectileBase }) => void | unverified | Called when a grenade is thrown. projectile is the newly created grenade projectile. |
OnGrenadeBounce | (event: GrenadeBounceEvent) => void | unverified | Called when a grenade bounces. |
OnKnifeAttack | (event: { weapon: CSWeaponBase, attackType: CSWeaponAttackType }) => void | none | Called when a knife attacks, even if it misses. |
OnCustomHudClicked | (event: { player: CSPlayerController, layout: CustomHudLayout, buttonId: string }) => void | none | Called when a button in a CustomHudLayout is clicked. |
Deprecated, kept for old scripts: OnBeforePlayerDamage, OnBeforeReload, OnReload.
Entity classes
What FindEntityByName, FindEntitiesByClass and the hooks hand back. A script object only exposes the methods listed on its page. Classnames lists what to pass to FindEntitiesByClass to get this type back: the Hammer classnames (through the curated docs/overlays/entity_classnames.yml) and the ones the game creates itself, such as player for every player pawn.
| Class | Extends | Members | Classnames |
|---|---|---|---|
BaseModelEntity | Entity | 9 | 79 Hammer classnames |
C4 | CSWeaponBase | 3 | weapon_c4 |
CSGrenadeProjectileBase | BaseModelEntity | 3 | flashbang_projectile |
CSHostage | BaseModelEntity | 6 | hostage_entity |
CSObservablePoint | Entity | 3 | observable_element |
CSObserverPawn | BaseModelEntity | 7 | observer |
CSPlantedC4 | BaseModelEntity | 11 | planted_c4 |
CSPlayerController | Entity | 17 | cs_player_controller |
CSPlayerPawn | BaseModelEntity | 32 | player |
CSPrecache | 6 | ||
CSRadarPoint | Entity | 4 | radar_element |
CSWeaponBase | BaseModelEntity | 8 | 43 Hammer classnames |
CSWeaponData | 10 | ||
CustomHudLayout experimental | Entity | 8 | custom_hud_layout |
CustomPlayerCamera experimental | Entity | 4 | |
Entity | 36 | 139 Hammer classnames | |
PointTemplate | Entity | 1 | point_template |
Interfaces
The exported singletons' types (IPointScript, IConsole, IGameRules) and the shapes of event payloads, trace configs and results.
BaseTraceConfig(5)BombDefuseEvent(2)BombPlantEvent(2)BulletTrace(6)BulletTraceResult(4)CameraFollowConfig(6)EntityDamage(6)GrenadeBounceEvent(4)IConsole(11)IEntities(6)IGameRules(12)IPointScript(93)ModfiyPlayerDamageResult(4)ModifyPlayerDamageEvent(8)PlayerDamageEvent(8)PlayerTrace(4)PlayerTraceResult(6)SpawnGrenadeProjectileConfigWithOwner(7)SpawnGrenadeProjectileConfigWithoutOwner(5)TraceResult(7)
Type aliases
| Alias | Definition |
|---|---|
Color | { r: number, g: number, b: number, a: number } |
ColorArg | { r: number, g: number, b: number, a?: number } |
EntityKeyValue | boolean | number | string | Vector | QAngle |
InputValue | boolean | number | string | Vector | Color | undefined |
QAngle | { pitch: number, yaw: number, roll: number } |
RotationVector | { x: number, y: number, z: number } |
SpawnGrenadeProjectileConfig | SpawnGrenadeProjectileConfigWithOwner | SpawnGrenadeProjectileConfigWithoutOwner |
Vector | { x: number, y: number, z: number } |
Enums
17 enums. Where an enum mirrors an engine enum the Engine column pairs each member with the engine member of the same name. 7 of them are renumbered (CSDamageFlags, CSDamageTypes, CSGearSlot, CSInputs, CSLoadoutSlot, CSMoveType, CSWeaponAttackType). The script value is what script methods take and return (SetMoveType, GetMoveType). An integer that goes through the map instead, as a KeyValue (movetype 2) or an input parameter, is read by the engine, so it is most likely the engine number: CSMoveType.WALK is 1 but MOVETYPE_WALK is 2. That last point is unverified in game, so test before relying on it. Values from a schema dump, a demo or a server plugin are engine numbers too.
CSDamageFlags renumbered
Engine enum: TakeDamageFlags_t
| Member | Value | Engine | Notes |
|---|---|---|---|
NONE | 0 | DFLAG_NONE = 0 | |
SUPPRESS_HEALTH_CHANGES | 1 (1 << 0) | DFLAG_SUPPRESS_HEALTH_CHANGES = 1 | |
SUPPRESS_PHYSICS_FORCE | 2 (1 << 1) | DFLAG_SUPPRESS_PHYSICS_FORCE = 2 | |
SUPPRESS_EFFECTS | 4 (1 << 2) | DFLAG_SUPPRESS_EFFECTS = 4 | |
PREVENT_DEATH | 8 (1 << 3) | DFLAG_PREVENT_DEATH = 8 | |
FORCE_DEATH | 16 (1 << 4) | DFLAG_FORCE_DEATH = 16 | |
SUPPRESS_DAMAGE_MODIFICATION | 32 (1 << 5) | DFLAG_SUPPRESS_DAMAGE_MODIFICATION = 256 differs | |
IGNORE_ARMOR | 64 (1 << 6) | DFLAG_IGNORE_ARMOR = 262144 differs |
CSDamageType deprecated
No members declared.
CSDamageTypes renumbered
Engine enum: DamageTypes_t
| Member | Value | Engine | Notes |
|---|---|---|---|
GENERIC | 0 | DMG_GENERIC = 0 | |
CRUSH | 1 (1 << 0) | DMG_CRUSH = 1 | |
BULLET | 2 (1 << 1) | DMG_BULLET = 2 | |
SLASH | 4 (1 << 2) | DMG_SLASH = 4 | |
BURN | 8 (1 << 3) | DMG_BURN = 8 | |
VEHICLE | 16 (1 << 4) | DMG_VEHICLE = 16 | |
FALL | 32 (1 << 5) | DMG_FALL = 32 | |
BLAST | 64 (1 << 6) | DMG_BLAST = 64 | |
CLUB | 128 (1 << 7) | DMG_CLUB = 128 | |
SHOCK | 256 (1 << 8) | DMG_SHOCK = 256 | |
SONIC | 512 (1 << 9) | DMG_SONIC = 512 | |
BUCKSHOT | 1024 (1 << 10) | DMG_BUCKSHOT = 2048 differs | |
DROWN | 2048 (1 << 11) | DMG_DROWN = 16384 differs | |
POISON | 4096 (1 << 12) | DMG_POISON = 32768 differs | |
HEADSHOT | 8192 (1 << 13) | DMG_HEADSHOT = 524288 differs |
CSGearSlot renumbered
Engine enum: gear_slot_t
| Member | Value | Engine | Notes |
|---|---|---|---|
INVALID | -1 | GEAR_SLOT_INVALID = -1 | |
RIFLE | 0 | GEAR_SLOT_RIFLE = 0 | |
PISTOL | 1 | GEAR_SLOT_PISTOL = 1 | |
KNIFE | 2 | GEAR_SLOT_KNIFE = 2 | |
GRENADES | 3 | GEAR_SLOT_GRENADES = 3 | |
C4 | 4 | GEAR_SLOT_C4 = 4 | |
BOOSTS | 5 | GEAR_SLOT_BOOSTS = 11 differs |
CSGrenadeType
| Member | Value | Notes |
|---|---|---|
HE | 0 | |
FLASHBANG | 1 | |
MOLOTOV | 2 | |
INCENDIARY | 3 | |
DECOY | 4 | |
SMOKE | 5 |
CSHitGroup same values as engine
Engine enum: HitGroup_t
| Member | Value | Engine | Notes |
|---|---|---|---|
INVALID | -1 | HITGROUP_INVALID = -1 | |
GENERIC | 0 | HITGROUP_GENERIC = 0 | |
HEAD | 1 | HITGROUP_HEAD = 1 | |
CHEST | 2 | HITGROUP_CHEST = 2 | |
STOMACH | 3 | HITGROUP_STOMACH = 3 | |
LEFTARM | 4 | HITGROUP_LEFTARM = 4 | |
RIGHTARM | 5 | HITGROUP_RIGHTARM = 5 | |
LEFTLEG | 6 | HITGROUP_LEFTLEG = 6 | |
RIGHTLEG | 7 | HITGROUP_RIGHTLEG = 7 | |
NECK | 8 | HITGROUP_NECK = 8 |
CSInputs renumbered
Engine enum: InputBitMask_t
| Member | Value | Engine | Notes |
|---|---|---|---|
NONE | 0 | IN_NONE = 0 | |
FORWARD | 1 (1 << 0) | IN_FORWARD = 8 differs | |
BACK | 2 (1 << 1) | IN_BACK = 16 differs | |
LEFT | 4 (1 << 2) | no counterpart | |
RIGHT | 8 (1 << 3) | no counterpart | |
WALK | 16 (1 << 4) | no counterpart | |
DUCK | 32 (1 << 5) | IN_DUCK = 4 differs | |
JUMP | 64 (1 << 6) | IN_JUMP = 2 differs | |
USE | 128 (1 << 7) | IN_USE = 32 differs | |
ATTACK | 256 (1 << 8) | IN_ATTACK = 1 differs | |
ATTACK2 | 512 (1 << 9) | IN_ATTACK2 = 2048 differs | |
RELOAD | 1024 (1 << 10) | IN_RELOAD = 8192 differs | |
SHOW_SCORES | 2048 (1 << 11) | no counterpart | |
LOOK_AT_WEAPON | 4096 (1 << 12) | IN_LOOK_AT_WEAPON = 34359738368 differs |
CSLoadoutSlot renumbered
Engine enum: loadout_slot_t
| Member | Value | Engine | Notes |
|---|---|---|---|
INVALID | 0 | LOADOUT_SLOT_INVALID = -1 differs | |
MELEE | 1 | LOADOUT_SLOT_MELEE = 0 differs | |
SECONDARY0 | 2 | LOADOUT_SLOT_SECONDARY0 = 2 | |
SECONDARY1 | 3 | LOADOUT_SLOT_SECONDARY1 = 3 | |
SECONDARY2 | 4 | LOADOUT_SLOT_SECONDARY2 = 4 | |
SECONDARY3 | 5 | LOADOUT_SLOT_SECONDARY3 = 5 | |
SECONDARY4 | 6 | LOADOUT_SLOT_SECONDARY4 = 6 | |
SMG0 | 7 | LOADOUT_SLOT_SMG0 = 8 differs | |
SMG1 | 8 | LOADOUT_SLOT_SMG1 = 9 differs | |
SMG2 | 9 | LOADOUT_SLOT_SMG2 = 10 differs | |
SMG3 | 10 | LOADOUT_SLOT_SMG3 = 11 differs | |
SMG4 | 11 | LOADOUT_SLOT_SMG4 = 12 differs | |
RIFLE0 | 12 | LOADOUT_SLOT_RIFLE0 = 14 differs | |
RIFLE1 | 13 | LOADOUT_SLOT_RIFLE1 = 15 differs | |
RIFLE2 | 14 | LOADOUT_SLOT_RIFLE2 = 16 differs | |
RIFLE3 | 15 | LOADOUT_SLOT_RIFLE3 = 17 differs | |
RIFLE4 | 16 | LOADOUT_SLOT_RIFLE4 = 18 differs | |
EQUIPMENT2 | 17 | LOADOUT_SLOT_EQUIPMENT2 = 34 differs |
CSMoveType renumbered
Engine enum: MoveType_t
| Member | Value | Engine | Notes |
|---|---|---|---|
INVALID | -1 | MOVETYPE_INVALID = 11 differs | |
NONE | 0 | MOVETYPE_NONE = 0 | |
WALK | 1 | MOVETYPE_WALK = 2 differs | |
FLYGRAVITY | 2 | MOVETYPE_FLYGRAVITY = 4 differs | |
VPHYSICS | 3 | MOVETYPE_VPHYSICS = 5 differs | |
NOCLIP | 4 | MOVETYPE_NOCLIP = 7 differs | |
OBSERVER | 5 | MOVETYPE_OBSERVER = 8 differs | |
LADDER | 6 | MOVETYPE_LADDER = 9 differs | |
CUSTOM | 7 | MOVETYPE_CUSTOM = 10 differs |
CSObserverMode same values as engine
Engine enum: ObserverMode_t
| Member | Value | Engine | Notes |
|---|---|---|---|
NONE | 0 | OBS_MODE_NONE = 0 | |
FIXED | 1 | OBS_MODE_FIXED = 1 | |
IN_EYE | 2 | OBS_MODE_IN_EYE = 2 | |
CHASE | 3 | OBS_MODE_CHASE = 3 | |
ROAMING | 4 | OBS_MODE_ROAMING = 4 |
CSRadarColor
| Member | Value | Notes |
|---|---|---|
PLAYERHUD | 0 | |
GRAY | 1 | |
WHITE | 2 | |
CT | 3 | |
T | 4 | |
RED | 5 | |
GREEN | 6 |
CSRadarIcon
| Member | Value | Notes |
|---|---|---|
TOWER | 0 | |
C4 | 1 | |
HOSTAGE | 2 |
CSRoundEndReason
| Member | Value | Notes |
|---|---|---|
UNKNOWN | -1 | |
IN_PROGRESS | 0 | |
GAME_COMMENCING | 1 | |
DRAW | 2 | |
TARGET_BOMBED | 3 | |
TARGET_SAVED | 4 | |
BOMB_DEFUSED | 5 | |
HOSTAGES_RESCUED | 6 | |
HOSTAGES_NOT_RESCUED | 7 | |
CTS_WIN | 8 | |
TERRORISTS_WIN | 9 | |
CTS_SURRENDER | 10 | |
TERRORISTS_SURRENDER | 11 |
CSTeamMoneyReason
| Member | Value | Notes |
|---|---|---|
NONE | 0 | $0 |
TERRORIST_WIN_BOMB | 1 | cash_team_terrorist_win_bomb |
ELIMINATION_HOSTAGE_MAP_T | 2 | cash_team_elimination_hostage_map_t |
ELIMINATION_HOSTAGE_MAP_CT | 3 | cash_team_elimination_hostage_map_ct |
ELIMINATION_BOMB_MAP | 4 | cash_team_elimination_bomb_map |
WIN_BY_TIME_RUNNING_OUT_HOSTAGE | 5 | cash_team_win_by_time_running_out_hostage |
WIN_BY_TIME_RUNNING_OUT_BOMB | 6 | cash_team_win_by_time_running_out_bomb |
WIN_BY_DEFUSING_BOMB | 7 | cash_team_win_by_defusing_bomb |
WIN_BY_HOSTAGE_RESCUE | 8 | cash_team_win_by_hostage_rescue |
LOSER_BONUS | 9 | cash_team_loser_bonus |
RESCUED_HOSTAGE | 10 | cash_team_rescued_hostage |
HOSTAGE_ALIVE | 11 | cash_team_hostage_alive |
PLANTED_BOMB_BUT_DEFUSED | 12 | cash_team_planted_bomb_but_defused |
HOSTAGE_INTERACTION | 13 | cash_team_hostage_interaction |
BONUS_SHORTHANDED | 14 | cash_team_bonus_shorthanded |
CSWeaponAttackType renumbered
Engine enum: WeaponAttackType_t
| Member | Value | Engine | Notes |
|---|---|---|---|
INVALID | 0 | eInvalid = -1 differs | |
PRIMARY | 1 | ePrimary = 0 differs | |
SECONDARY | 2 | eSecondary = 1 differs |
CSWeaponType same values as engine
Engine enum: CSWeaponType
| Member | Value | Engine | Notes |
|---|---|---|---|
KNIFE | 0 | WEAPONTYPE_KNIFE = 0 | |
PISTOL | 1 | WEAPONTYPE_PISTOL = 1 | |
SUBMACHINEGUN | 2 | WEAPONTYPE_SUBMACHINEGUN = 2 | |
RIFLE | 3 | WEAPONTYPE_RIFLE = 3 | |
SHOTGUN | 4 | WEAPONTYPE_SHOTGUN = 4 | |
SNIPER_RIFLE | 5 | WEAPONTYPE_SNIPER_RIFLE = 5 | |
MACHINEGUN | 6 | WEAPONTYPE_MACHINEGUN = 6 | |
C4 | 7 | WEAPONTYPE_C4 = 7 | |
TASER | 8 | WEAPONTYPE_TASER = 8 | |
GRENADE | 9 | WEAPONTYPE_GRENADE = 9 | |
EQUIPMENT | 10 | WEAPONTYPE_EQUIPMENT = 10 | |
STACKABLEITEM | 11 | WEAPONTYPE_STACKABLEITEM = 11 | |
UNKNOWN | 12 | WEAPONTYPE_UNKNOWN = 12 |
CustomCameraMode same values as engine
Engine enum: CustomCameraMode_t
| Member | Value | Engine | Notes |
|---|---|---|---|
DISABLED | 0 | CUSTOM_CAMERA_MODE_DISABLED = 0 | Position and angles come from the eye position and angles of the player. |
CONTROLLED | 1 | CUSTOM_CAMERA_MODE_CONTROLLED = 1 | Position and angles come from the origin and angles of the camera entity. |
CONTROLLED_POSITION | 2 | CUSTOM_CAMERA_MODE_CONTROLLED_POSITION = 2 | Position comes from the origin of camera entity. Angles are player controlled. |
FOLLOW_POSITION | 3 | CUSTOM_CAMERA_MODE_FOLLOW_POSITION = 3 | Position comes from an offset around a followed position. Angles are player controlled. |