The latest Counter-Strike 2 update is aimed squarely at mapmakers. Valve has expanded CS2 map scripting with hostage events, a new console variable interface and round control through a dedicated GameRules export, alongside a reorganization of existing APIs and a batch of scripting bug fixes. The notes do not describe changes to regular match gameplay.
What’s new in the Counter-Strike 2 map scripting update
This update is a technical changelog for CS2 Workshop maps. Most entries add new methods and events to the scripting API, rename or relocate existing functions, and correct mismatches between the engine and its type definitions.
Hostage scripting: new CSHostage methods and events
Hostages get a much deeper scripting surface. The new CS2 hostage scripting tools include a CSHostage class with methods that report whether a hostage is being picked up, being carried, or already rescued, plus who rescued them and when a pickup started and finished. CSPlayerPawn also gains a GetHostage method.
On the event side, mapmakers can now hook into six new hostage moments:
- OnHostagePickUpStart and OnHostagePickUpAbort
- OnHostagePickUp and OnHostageDrop
- OnHostageRescue and OnHostageKill
New Console and GameRules exports
Two new top-level exports reorganize how scripts talk to the game. The Console export handles console variables (convars): scripts can read them as booleans, numbers, strings, vectors, QAngles or colors, and set them with Console.SetConvar. Notably, SetConvar is not restricted by sv_cheats and runs synchronously. Several command functions, including ClientCommand, ServerCommand and RegisterCheatCommand, have moved here, and Instance.Msg is now Console.Log.
The GameRules export centralizes round and match control. It adds StartWarmup, EndWarmup, GetTeamScore, AddTeamScore and TerminateRound, and collects several timing and money functions from the Instance object, such as warmup and freeze period checks, round timers and AddTeamMoney.
Moved and renamed methods remain available in their original locations, but they are now deprecated, so existing maps will keep working while authors migrate.
Precaching and other API additions
Precaching, the practice of loading assets before they are needed so they do not stutter in play, is now exposed through Instance.Precache, which returns a CSPrecache object. Its methods report whether the server or client is still loading, whether it has finished, whether assets are loaded for everyone, and let scripts release the precache.
Other additions include two HUD layout classes, HUD_TEAMMENU_VISIBLE and HUD_CHAT_VISIBLE, and a change that lets radar_element appear on the radar in every game mode rather than only Rush.
Bug fixes and quality-of-life improvements
The update also fixes several issues. A crash in GameRules.AddTeamMoney when used with CSTeamMoneyReason.NONE has been resolved, and that call now accepts an amount. Enum values for CSTeamMoneyReason and CSWeaponAttackType now match point_script.d.ts, and CSRadarPoint.IsVisibleToTeam and CSObservablePoint.IsObservableForTeam now return true or false rather than a number.
Debugging gets easier too. Logged warnings now include the JavaScript call stack and details about bad argument values, and argument numbering now starts at 0 rather than 1. Autocomplete for the map_workshop command has also been improved.
Looking for other recent changes? See our coverage of an earlier Counter-Strike 2 update.
Source: Counter-Strike 2 Update on Steam (Counter-Strike feed).

