Custom HUD layouts, player camera, and scripting API additions (Aug 24, 2026)
Added `custom_hud_layout` and `cs_player_camera`, many new scripting APIs, improved script error logging, and a couple of deprecations.
Quick read
- Added `custom_hud_layout` entity for scripted-map UI (Panel/Label/Image/Button, `css` styling; no events/client-side scripting; retains state during tools reload).
- Added `cs_player_camera` to control a player's view without moving their pawn; can allow player look-around from the scripted position.
- Many new scripting APIs and methods added (instances, entities, player pawn/C4 methods, `CustomHudLayout` helpers, `CSPlayerCamera` controls, and `CSMoveType` enum).
- Improved script error logging and diagnostics (initial run errors, unhandled promise rejections, compile column numbers); deprecated `planter` and `defuser` event parameters.
This update introduces a new custom_hud_layout entity, a cs_player_camera entity, a large set of new scripting APIs, improved script error logging, and a few deprecations.
HUD layouts
- New entity: Added
custom_hud_layout. - Capabilities:
custom_hud_layoutsare the entry point for scripted maps to provide custom UI. - Supported panel types: Panel, Label, Image, and Button panel types are supported.
- Styling: Styling with
cssis supported. - Limitations: Events and client side scripting are not supported.
- Tools mode: Maintains state during tools mode reloads.
Player camera
- New entity: Added
cs_player_camera. - Behavior: Gives control of a player's view without moving their pawn.
- Configuration: Can be configured to let the player look around from the scripted position.
Scripting API additions
- Instance/API events and methods: Added
Instance.Delay,Instance.OnBombPlantStart,Instance.OnBombPlantAbort,Instance.OnBombDefuseStart,Instance.OnBombDefuseAbort,Instance.OnCustomHudClicked, andInstance.IsDedicatedServer. - Entity methods: Added
Entity.Move,Entity.GetMoveType, andEntity.SetMoveType. - Player pawn methods: Added
CSPlayerPawn.GetC4,CSPlayerPawn.GetDefuseTarget,CSPlayerPawn.IsBuyMenuOpen, andCSPlayerPawn.GetCamera. - C4 methods: Added
C4.GetPlantStartTime,C4.GetPlantFinishTime, andC4.AbortPlant. - Custom HUD methods: Added
CustomHudLayout.SetHasClass,CustomHudLayout.SetHasClassForPlayer,CustomHudLayout.SetDialogVariableString,CustomHudLayout.SetDialogVariableStringForPlayer,CustomHudLayout.SetInputCaptureEnabled, andCustomHudLayout.IsInputCaptureEnabled. - Player camera methods: Added
CSPlayerCamera.IsEnabled,CSPlayerCamera.SetEnabled, andCSPlayerCamera.SetIsControllingAngles. - Other additions: Added enum
CSMoveType. - Type corrections: Corrected types for some events where parameters were maybe undefined.
Errors, logging, and diagnostics
- Errors encountered during initial script run are now logged to the console.
- Unhandled promise rejections are now logged to the console.
- Added the column number to errors caught during the
CompileModulestep of script loading.
Deprecations
- Deprecated
planterfromInstance.OnBombPlantevent. - Deprecated
defuserfromInstance.OnBombDefuseevent.
