Valve expands CS2 Map Scripting with precaching, hostage tools and GameRules
The update adds resource-loading control, a hostage API, top-level Console and GameRules interfaces, plus new HUD and radar options.
SHOT editorial team2 min read

Valve has released a technical Counter-Strike 2 update aimed at map and custom-mode creators. Map Scripting now covers resource precaching, hostage states and events, console settings, and a dedicated interface for match rules.
Resource readiness and hostage scenarios
The new Instance.Precache call returns a CSPrecache object. A script can use it to check loading and loaded states on the server and client, determine when a resource is ready for everyone, and release the object. This gives scripted experiences an explicit way to account for resource readiness.
Valve also introduced CSHostage. Scripts can inspect whether a hostage is being picked up, carried or rescued, identify the rescuer, and read pickup timing. New instance events cover the start, cancellation and completion of a pickup, as well as drops, rescues and hostage deaths.
Separate interfaces for commands and match rules
Console is now a top-level interface that reads several convar types and changes them through Console.SetConvar. Client, server and cheat-command functions have moved there too, while the former Instance.Msg is now called Console.Log.
The new top-level GameRules interface handles warmup control, team scores, round termination, time and team money. Relocated methods remain available at their old locations for now, but are deprecated. HUD layouts gain flags for the team menu and chat, and radar_element can appear on the radar in every game mode instead of only Rush.
Valve also corrected enum mismatches with point_script.d.ts, fixed two visibility checks that returned numbers instead of booleans, and expanded warning logs with JavaScript call stacks and invalid-argument details.
Share this news
Send this story to a friend or your team chat


