CS2 Update (Aug 24, 2026)
CS2 adds an experimental custom HUD system for scripted maps, richer bomb and camera scripting APIs, and updates the official cs_script zoo example map to showcase the new tools.
Quick read
- Experimental `custom_hud_layout` entity and CustomHudLayout API let scripts drive simple HUDs with buttons, classes, and dialog variables.
- New script hooks around bomb planting/defusing, C4 control, movement types, and a promise-based `Instance.Delay` improve custom game logic.
- The cs_script zoo example map gains a scripted welcome dialog using the new HUD system and migrates its chess mini-game to the built-in delay helper.
- Engine schemas, user messages, and tooling are updated to support CustomHudClicked events and per-player custom HUD state networking.
A new CS2 update quietly introduces an experimental system for map‑scripted custom HUDs, plus new scripting tools around the bomb and player cameras – all showcased in the official cs_script “zoo” example map.
Experimental custom HUD layouts for scripted maps
- New
custom_hud_layoutentity: Hammer now exposes acustom_hud_layoutpoint entity incsgo.fgd. This lets map authors provide a Panorama XML layout that can be controlled fromcs_script. - Supported UI elements: The new scripting API documents that custom layouts can contain basic panels:
Panelwithid,class,hittestLabelwithid,class,hittest,textImagewithid,class,hittest,src,texturewidth,textureheightButtonwithid,classStyling via CSS is supported; client‑side JS in the HUD itself is not.
- Server‑driven visual state: Scripts can now:
- Toggle CSS classes on panels globally or per player with
CustomHudLayout.SetHasClass/SetHasClassForPlayer. - Set per‑panel dialog variables (text tokens) globally or per player with
SetDialogVariableString/SetDialogVariableStringForPlayer. This suggests creators can drive things like "quest" prompts, timers, or state indicators purely from server logic.
- Toggle CSS classes on panels globally or per player with
- Input capture from HUD:
CustomHudLayout.SetInputCaptureEnabled(playerSlot, enabled)gives maps a way to temporarily grab a player’s mouse for UI interaction.IsInputCaptureEnabledreports whether a layout is currently capturing input. While enabled, players may lose normal movement/mouse control until all capturing layouts release it. - Click events wired into user messages: A new user message
CS_UM_CustomHudClickedand the script callbackInstance.OnCustomHudClickedare added. When a player clicks a button in aCustomHudLayout, the server receives which layout andbuttonIdwere clicked. This may allow maps to implement menus, dialogs, or mini‑game controls fully server‑side. - HUD backing layouts in Panorama: Two new Panorama layout files (
hud/customhuds.xmlandhud/infohudlayouts.xml) appear to host the engine’s side of these custom layouts. These are internal scaffolding; players likely won’t see a new default HUD from them directly, but they underpin the new scripted HUD feature. - Experimental warning: The API is explicitly labeled
@experimentaland notes that breaking changes may happen. Authors building serious projects on it should expect possible adjustments in future builds.
Scripting upgrades for bombs, cameras, and movement
Updates to content/csgo/maps/editor/zoo/scripts/point_script.d.ts expand what cs_script can do on custom or community maps:
- Promise‑based timing helper:
Instance.Delay(delay: number): Promise<void>is now available as a built‑in async delay. This replaces the hand‑rolled think queue in the zoo chess script and simplifies long‑running scripted sequences.
- More detailed bomb lifecycle events:
- New callbacks split bomb interactions into start/abort/finish phases:
OnBombPlantStart,OnBombPlantAbort,OnBombPlantOnBombDefuseStart,OnBombDefuseAbort,OnBombDefuse, plusOnBombExplode
- New
BombPlantEventandBombDefuseEventtypes are introduced, with some fields marked as deprecated for future cleanup. This should let scripted maps or mods react more precisely to partial plant/defuse actions – for example, tutorial overlays or custom win conditions.
- New callbacks split bomb interactions into start/abort/finish phases:
- C4 weapon API:
- New
C4script class (extendingCSWeaponBase) includes:GetPlantStartTime()/GetPlantFinishTime()AbortPlant()
CSPlayerPawncan now surfaceGetC4()to retrieve a player’s C4 weapon, andGetDefuseTarget()to access the planted bomb they’re defusing. These tools appear aimed at more advanced bomb‑oriented training maps or game modes.
- New
- Player state and UI hooks:
CSPlayerPawn.IsBuyMenuOpen()lets scripts know when a player is in the buy menu.CSPlayerPawn.GetCamera()exposes aCSPlayerCameraentity for each player.
- New camera control entity:
CSPlayerCamerais a new experimental scriptable entity representing a player’s view.- Scripts can enable/disable it and call
SetIsControllingAngles(controlling: boolean). When not controlling angles, the player can look around freely from the camera position. This may lead to more polished scripted cameras for cutscenes, replays, or training views.
- Movement and interpolation helpers:
- New
CSMoveTypeenum lets scripts inspect or change how an entity moves (walk, fly, noclip, ladder, etc.) viaGetMoveType()andSetMoveType(). Move({...})is added as a sibling toTeleport, described as moving an entity without resetting the client’s interpolation history. This likely allows smoother visual repositioning for scripted moving objects.
- New
- Utility additions and type refinements:
Instance.IsDedicatedServer()helps scripts branch between listen and dedicated servers.- Several event fields (
OnPlayerChat,OnBulletImpact,ModifyPlayerDamageEvent.inflictor, etc.) are relaxed to be optional (?), making scripts more robust to cases where no entity is present.
These scripting additions are all surfaced through the official type definitions used by map authors, so they are intended to be used in custom content and should work in practice, not just in Valve’s internal examples.
Zoo example map: scripted welcome dialog and cleaner chess logic
Valve’s editor/zoo example map for cs_script has been expanded to demonstrate the new HUD and timing APIs.
- New welcome popup UI:
- A Panorama layout
welcome.xmlandwelcome.cssdefine a simple centered dialog:- Text: “Welcome to the cs_script zoo map!”
- A
Dismissbutton - A
DismissedCSS class that fades the dialog out by setting its opacity to zero.
- When a player spawns (
OnPlayerActivate),ShowWelcome(playerSlot)is called:- It clears the
Dismissedclass for that player so the dialog appears. - It enables input capture with
SetInputCaptureEnabled, so the player can click the dialog button.
- It clears the
Instance.OnCustomHudClickedlistens for click events:- If the clicked layout is the
welcome_layoutandbuttonIdisdismiss_button,HideWelcomeaddsDismissedback and disables input capture, returning control to the player.
- If the clicked layout is the
- A debug/cheat command
script_zoo_show_welcomeloops all players and shows the dialog again, illustrating how map authors can re‑trigger custom HUD flows on demand.
- A Panorama layout
- Chess script migrated to
Instance.Delay:- The chess mini‑game script previously implemented its own timing queue and
Delay()helper based onInstance.SetNextThink. - That custom queue and
Delayimplementation have been fully removed. - All async waits (e.g. within
RunChess, piece slide animations, piece death animations, and the AI’s minimax search throttling) now useawait Instance.Delay(0). This shows how the new built‑in delay API is meant to simplify long‑running async gameplay logic.
- The chess mini‑game script previously implemented its own timing queue and
Players exploring the zoo map after this update should see a small welcome window on first spawn, demonstrating exactly how custom HUD layouts can look and behave.
Engine and protocol plumbing behind the new HUD tools
While not directly visible in normal gameplay, a number of engine‑level and schema updates support the new HUD features:
- Custom HUD networking structures:
- New schema types (
CCSCustomHudLayout,CCSCustomHudLayoutState,HUDPanelHasClass_t,HUDPanelDialogVariableString_t, andEHudPanelClassStatus_t) appear on both client and server. These cover:- The layout resource name.
- Per‑player and global layout state (which classes and dialog variables are applied to which panels).
- Whether a layout is capturing input for a given player.
- New schema types (
- Player camera entity:
CCSPlayerCamerais added on client and server, with fields linking it to a pawn handle and booleans tracking whether it is enabled and whether it is controlling the player’s aim.
- User message and enum wiring:
- The
ECstrike15UserMessagesenum gainsCS_UM_CustomHudClicked = 390, tying the new HUD click notification into the existing user message pipeline. - A corresponding
CCSUsrMsg_CustomHudClickedprotocol message carries a layout identifier and button ID to the server.
- The
- Toolchain and string updates:
- Various internal tools and string tables (server, client, Panorama, VScript, resource compiler, etc.) are refreshed. Among them are new HUD‑related string structures (
HUDPanelHasClass_t, dialog variable vectors, etc.) and updated V8 scripting support. - These changes are mostly under‑the‑hood and are unlikely to affect players directly but are necessary for the new scripting features to function reliably.
- Various internal tools and string tables (server, client, Panorama, VScript, resource compiler, etc.) are refreshed. Among them are new HUD‑related string structures (
Overall impact
This update is focused on creators and scripters rather than core competitive gameplay:
- Map authors gain an experimental, officially supported way to build simple interactive HUDs driven from
cs_script, including per‑player state, click handling, and input capture. - Bomb‑related scripting hooks become significantly richer, which may benefit training maps, tutorials, or custom modes centered on planting and defusing.
- The new
CSPlayerCamera, movement helpers, and promise‑based delay API should make advanced scripted experiences (custom cameras, minigames, smoother moving entities) easier to implement.
For most players in standard matchmaking, the immediate impact will be subtle. Over time, though, these tools may lead to more polished custom maps, better training utilities, and more creative community game modes built on CS2’s scripting system.
