CS2 Update (Aug 25, 2026)
CS2 adds an official cs_script demo addon, a full JavaScript API reference, and support for custom Panorama HUD layouts controlled by scripts, giving map makers powerful new tools.
Quick read
- New official cs_script demo addon with an example map, scripts, and custom UI.
- Full TypeScript declaration file documents the cs_script JavaScript API for point_script entities.
- Multiple sample scripts demonstrate tracing, grenade training, model changes, input debugging, and custom welcome UI.
- Custom Panorama game UI is now allowed and wired into new search paths for custom HUD layouts and styles.
- Editor tooltips and zoo welcome screen updated to redirect creators to the new cs_script_demo addon.
- Client and server builds bumped with minor internal schema and engine adjustments.
A new Counter-Strike 2 build focuses on scripting and custom UI: Valve is rolling out an official cs_script demo addon, a full JavaScript API reference for map scripts, and support for custom Panorama HUD layouts controlled from scripts. This update is squarely aimed at mappers, modders, and Workshop creators, with only minor visible changes for regular players.
Official cs_script demo addon and example map
- New demo addon: A new addon named
cs_script_demois now defined undercsgo_addons, withaddoninfo.txtpointing to acs_script_demomap. This appears to be an official example package intended to ship with the tools. - Demo map content: The addon manifest lists a
cs_script_demo.vmapmap plus multiple compiled script files (.vjs) and a custom Panorama layout and style. This suggests the demo map will showcasecs_scriptcapabilities end-to-end: gameplay logic, tracing utilities, custom HUD, and scripted interactions. - Access method: The new welcome text specifically says the "cs_script demo has moved to csgo_addons/cs_script_demo" and instructs users to "launch with workshop tools." This strongly suggests the demo is meant to be opened from the Workshop/Tools environment rather than from standard matchmaking.
For players who don’t use tools, this content may not appear directly in normal play, but it should make it easier for creators to learn the scripting system and build higher-quality custom maps.
Full JavaScript API reference for cs_script
-
New
point_scriptTypeScript declarations: A largepoint_script.d.tsfile was added undercs_script_demo/maps/scripts. It documents the JavaScript API exposed to scripts attached topoint_scriptentities via the module name"cs_script/point_script". -
Editor integration: Comments explain that placing
point_script.d.tsand an accompanyingtsconfig.jsonnext to your scripts allows editors to provide IntelliSense, type-checking, and tooling for JavaScript targeting the current CS2 runtime. This should significantly improve the scripting workflow for creators. -
Core API surface: The declarations expose a central
Instanceobject with callbacks and helpers for:- Game lifecycle:
OnActivate,OnPlayerConnect,OnPlayerActivate,OnPlayerDisconnect,OnRoundStart,OnRoundEnd, round restart hooks, bomb plant/defuse events, and more. - Combat and damage:
OnModifyPlayerDamage(with the ability to alter damage, flags, or cancel hits),OnPlayerDamage,OnPlayerKill,OnGunFire,OnGunReload,OnBulletImpact, knife attacks, grenade throws and bounces. - Player interaction: chat (
OnPlayerChat), pings (OnPlayerPing), jumps and landings, weapon pick-ups and drops. - Tracing and physics queries:
TraceLine,TraceSphere,TraceBox,TracePlayer, andTraceBullet, with structured result types. - World interaction: firing entity inputs (
EntFireAtName,EntFireAtTarget), listening to outputs viaConnectOutput/DisconnectOutput, and entity search helpers (FindEntityByName,FindEntitiesByClass, etc.). - Timing utilities: a think system (
SetThink,SetNextThink),Delaypromises, andQueueAfterThinksfor safe post-physics modifications. - Game state queries: round time, warmup/freeze status, game type/mode, map name, and round count, plus control over round remaining time.
- Commands:
ClientCommand,ServerCommand, andRegisterCheatCommandfor script-driven console utilities. - Persistent data:
SetSaveDataandGetSaveDatafor addon-associated save strings.
- Game lifecycle:
-
Entity and player classes: The declarations include classes like
Entity,BaseModelEntity,CSWeaponBase,CSPlantedC4,CSGrenadeProjectileBase,CSPlayerPawn,CSPlayerController,CSObserverPawn,CustomHudLayout,CSPlayerCamera, andPointTemplate, each with focused APIs for movement, models, health, weapons, armor, money, camera control, and custom HUD behavior. -
Enums and data structures: A wide range of enums (movement type, weapon type, damage types and flags, hitgroups, input flags, grenade type, loadout slots, etc.) and data interfaces (for bullet traces, player traces, damage events, grenade bounces, and bomb events) are formally documented.
-
Deprecations called out: Several methods and overloads are marked
@deprecatedand noted as being removed in a future update. This gives script authors early warning to migrate away from legacy helpers likeOnBeforePlayerDamage, older debug drawing overloads, and specific damage helpers.
Overall, this file formalizes the scripting surface that many mappers have been experimenting with, and it should make cs_script less guesswork-heavy and more stable for serious Workshop projects.
New example scripts: traces, inputs, grenades, models, and UI
Several concrete JavaScript samples are now bundled in cs_script_demo. These are designed to show how to use the API in real map logic and should be highly useful as references.
Tracing and bullet visualization (trace.js)
- Cheat command for debug traces: A
script_zoo_tracecheat command toggles various trace modes:line,sphere,box,player, orbullet. - Line/sphere/box traces: The script:
- Grabs the first player’s eye position and view direction.
- Performs different trace types depending on mode (line, sphere, or an axis-aligned box), ignoring the player as needed.
- Uses
DebugSphere,DebugBox, andDebugLineto draw hit points and surface normals.
- Player collision traces: A
TracePlayerexample shows how collision behaves as a player moves, using the pawn’s ducked height to size the box. - Bullet simulation: A
TraceBulletexample uses the active weapon’s range, damage, range modifier, and penetration values to simulate bullet travel and penetration. It:- Colors impacts differently for world hits, low damage, normal damage, and very high damage.
- Marks headshots with a small sphere and other hits with a tiny box.
This script effectively demonstrates how creators can build visualizers for movement, collision, and bullet behavior, which may be invaluable for designing training maps and debugging custom mechanics.
Grenade training mini-mode (grenadetraining.js)
- Rotating target selection: The script tracks rounds, hits, and a current target index, then:
- Randomly selects from multiple targets with a simple anti-repeat rule.
- Adjusts difficulty based on the round count.
- Uses entity inputs (
cover.*,tele.*, and world text entities) to reveal the next target and reset the player.
- Training flow: Custom script inputs manage the state machine:
ResetAndCleanUpresets triggers, timers, text, sounds, and cover props, turns off infinite ammo, destroys the player’s weapons, and forces the grenade slot.StartTrainingarms the mode: enables infinite ammo, gives the player a HE grenade, starts countdowns and timers, and resets rounds/hits.GrenadeHitincrements a hit counter, plays a sound, updates UI text, and removes a tracked projectile if present.SetNextTargetis driven by a timer, rotating to a new target for up to 10 rounds and then cleaning up and playing an end sound.
- Live grenade path drawing: Using
OnGrenadeThrow, the script tracks the thrown projectile and draws a continuous debug line behind it each tick until it disappears, helping visualize the trajectory.
This demonstrates how to build a fully scripted, UI-backed training mode that reacts to player actions and game entities without relying only on traditional Hammer logic chains.
Model manipulation and glow effects (mdlchange.js)
- Dynamic models: The script finds a named prop (
mdlchange.prop_dyn) and shows how to:- Change its model at runtime via
SetModelto one of several example models. - Scale the prop up or down over time using
SetModelScaleand a simple multiplier.
- Change its model at runtime via
- Glow toggling: A
GlowTogglescript input usesGlow,Unglow, andIsGlowingto make the prop stand out, illustrating how custom maps could highlight interactable objects or targets.
Player input inspection (input.js)
- Input debug command: A
script_zoo_showinputcheat command toggles a watched player pawn (the first controller’s pawn). - On-screen input status: Every tick, the script prints three lines of debug HUD text for the watched pawn:
- Inputs currently pressed (
IsInputPressed). - Inputs just pressed this tick (
WasInputJustPressed). - Inputs just released this tick (
WasInputJustReleased).
- Inputs currently pressed (
This sample shows how to introspect and visualize player input flags in real time, which may be especially useful for movement analysis or teaching maps.
Welcome flow, bots, and damage tweaks (setup.js)
- Server setup commands: On script load, the demo:
- Enables
sv_cheats, offline warmup, and pausing the warmup timer, which makes the environment safe for experiments.
- Enables
- First-player auto-setup: On the first
OnPlayerActivateevent, the script:- Forces the player onto team
2. - Stops bots and adds one bot, presumably as a training target.
- Shows a welcome UI to that player.
- Forces the player onto team
- Damage modifications: Using
OnModifyPlayerDamageandOnPlayerDamage:- Damage against bots is flagged with
CSDamageFlags.PREVENT_DEATH, effectively making bot targets immortal. - Slash damage (e.g., knife swings) causes a fun effect: after the damage, the script schedules a velocity adjustment that boosts the victim upward using
Teleportwith a modified velocity vector.
- Damage against bots is flagged with
- Custom welcome dialog: The script wires a
CustomHudLayoutentity namedwelcome_layoutto:- Show a dialog to joining players via
SetHasClassForPlayerandSetInputCaptureEnabled. - Hide it when the player clicks a button with id
dismiss_button, detected viaOnCustomHudClicked.
- Show a dialog to joining players via
- Manual re-show command: A
script_zoo_show_welcomecheat command re-displays the welcome dialog for all connected controllers.
This sample weaves together player lifecycle events, damage hooks, entity motion, bots, and custom HUD controls into a cohesive tutorial-style experience.
Minimal hello-world script (hello.js)
- Basic output: The simplest sample just imports
Instanceand prints"Hello cs_script!"to the console. It serves as a straightforward first step for creators verifying their setup.
Custom HUD and game UI support
-
Custom game UI enabled: The core game configuration now sets
AllowCustomGameUIto1. This indicates that the engine now allows custom Panorama UI for games/maps to be active, where previously it was disabled. -
Search paths for custom layouts: The main game info configuration now includes:
"panorama/layout/custom_game""panorama/styles/custom_game"
as resource search paths. This means layouts and styles placed there can be loaded by the game.
-
Custom HUD entity docs: The
csgo.fgddefinition forcustom_hud_layout(the entity that connectscs_scriptto Panorama HUD layouts) still describes it as "Panorama UI that can be controlled by cs_script." A small change removes an in-editor help reference to adev_report_info_hud_layoutcommand, simplifying the tooltip text. The entity continues to use alayout(resource:xml)field for specifying a Panorama layout. -
Welcome screen content update: The editor zoo map’s
welcome.xmlandwelcome.cssfiles have been adjusted:- The dialog box is now wider and slightly taller (520x220 instead of 350x200), leaving more room for text.
- The text now informs users that "The cs_script demo has moved to csgo_addons/cs_script_demo. Launch with workshop tools to view." This clearly redirects mappers to the new addon-based demo and away from the older built-in map.
Creators can likely now design more expressive HUDs and dialogs for their maps, controlled directly from scripts, using the CustomHudLayout class together with custom Panorama layouts and CSS in the new directories.
Editor and tooling changes for script assets
- Asset type visibility: The shared asset type configuration no longer hides certain script-related asset types from the retail CS:GO/CS2 environment. Specifically, references to
m_HideForRetailMods = [ "csgo" ]have been removed for some KV3-based Panorama layout/style resource types. This may allow those assets to be more broadly recognized in the tools and pipeline rather than being strictly editor-only. - Updated zoo script editor files: Compiled
welcomelayout/style resources (welcome.vxml_c/welcome.vcss_c) are re-listed in the game package manifest for the editor zoo map scripts, indicating they’re still part of the toolset and have simply been updated alongside the new text and dimensions. - Movement enum cleanup in editor stubs: The editor’s version of
point_script.d.tsused in thezoomap has had two movement enum entries (FLY,PUSH) removed fromCSMoveType, aligning it with the new canonical demo API. This should reduce confusion between the in-editor stub and the official addon version.
These tweaks mostly affect how assets appear and behave in the tools, not normal gameplay, but they help keep the scripting and UI pipelines consistent.
Under-the-hood and versioning updates
- Client and server build bump: The
steam.inffile shows the client and server versions moving from2000888to2000891, with updated source revision and build time. This signals a new released build, although gameplay behavior outside of scripting/UI does not appear to change in obvious ways. - Minor engine and schema adjustments: There are small changes to engine string tables and a pair of internal schema headers related to dynamic pitch/volume (
dynpitchvol_*). These appear to be foundational adjustments rather than new user-facing features.
Overall impact
For everyday players, this update is subtle: you’re unlikely to see major gameplay or balance differences. The most immediate visible change is that the old editor zoo welcome panel now tells you to use the new cs_script_demo addon.
For map makers, modders, and Workshop creators, this build is significant:
- You get an official, strongly-typed reference for the
cs_scriptAPI, making JavaScript-based map logic far easier to write and maintain. - You gain a full demo addon with multiple example scripts showing how to work with damage hooks, tracing, bullets, grenades, bots, custom HUDs, entity models, and player input.
- The engine now appears to fully support custom Panorama HUD layouts controlled from
cs_script, opening the door for richer training maps, scenarios, and bespoke UIs.
Taken together, this update turns cs_script from a mostly experimental feature into something much closer to a first-class scripting environment for CS2 custom content, and it likely sets the stage for more sophisticated community creations.
