Counter-Strike 2 Update Brings Map Scripting Changes
Valve has released a Counter-Strike 2 update introducing new map scripting tools, custom UI entities, and developer functions.
Map Scripting and Custom User Interfaces
A fresh set of tools for map creators has arrived in Counter-Strike 2. The update introduces the custom_hud_layout entity, serving as the starting point for custom user interfaces on scripted maps. These layouts support panels, labels, images, and buttons, alongside CSS styling capabilities. While events and client-side scripting are absent from this feature, the layouts retain their state when tools mode reloads. Dedicated server checks, input capture controls, and methods for setting classes and dialog variable strings for individual players or globally have also been provided.
Camera Controls and Player State
Creators can now utilise the cs_player_camera entity to command a player's field of view independently of their pawn's physical location. This element can be configured to allow free-look movement from the designated script position. Alongside this, new functions let scripts identify if a player has a C4 explosive, check for a defusal target, determine whether the buy menu is active, and retrieve camera data.
Bomb interaction functions have been expanded to monitor plant and defuse starts and aborts, retrieve plant timing details, and force plant cancellations. Furthermore, the planter and defuser parameters within the respective bomb plant and defuse events have been marked as deprecated.
Server Administration and Developer Diagnostics
For those running a server, the update adds a check to determine if an instance is operating as a dedicated server. Additional script adjustments include movement type enumerations and methods to retrieve and alter entity movement types.
Debugging features have been improved. Any errors that occur during the initial script execution will now appear in the console. Unhandled promise rejections are likewise directed to the console, and compile-phase script loading errors now include specific column numbers to help pinpoint issues.
---
Based on the official Counter-Strike 2 Update announcement. Live Counter-Strike 2 servers, with player counts updated every fifteen minutes, are on the Counter-Strike 2 server list.


