LIVE
Flutter to Cut Up to 1,400 UK & Ireland Jobs, Blames Tax Hikes◆Valve's CS2 update adds hostage scripting, GameRules export for mapmakers◆GameRant Lists Rocket League, Blitzball as Top Video Games to Watch Live◆CS2 skins evolve into complex economy with collectible, trading and wagering roles◆CS2 Explained: How Valve's Tactical Shooter Became an Esports Giant◆Apex Legends Players Can Build Their Own Weapon TTK Calculator◆Bigfoot Sports Breaks Sues TikTok, Fanatics Over Alleged Steering to Exclusivity Deal◆Wolves Esports Opens VCT Threshold China 2026 with 2-0 Win Over A Team◆TenZ posts 'LFT' on X, signaling possible return to VALORANT pro play◆Fortnite Chapter 7 Season 4 'Override' Ends November 1, Next Season Expected Shortly After◆Flutter to Cut Up to 1,400 UK & Ireland Jobs, Blames Tax Hikes◆Valve's CS2 update adds hostage scripting, GameRules export for mapmakers◆GameRant Lists Rocket League, Blitzball as Top Video Games to Watch Live◆CS2 skins evolve into complex economy with collectible, trading and wagering roles◆CS2 Explained: How Valve's Tactical Shooter Became an Esports Giant◆Apex Legends Players Can Build Their Own Weapon TTK Calculator◆Bigfoot Sports Breaks Sues TikTok, Fanatics Over Alleged Steering to Exclusivity Deal◆Wolves Esports Opens VCT Threshold China 2026 with 2-0 Win Over A Team◆TenZ posts 'LFT' on X, signaling possible return to VALORANT pro play◆Fortnite Chapter 7 Season 4 'Override' Ends November 1, Next Season Expected Shortly After◆
REDINGTONCYBERSPORTSubscribe
CS2LoLValorantDota 2CoDFortniteApexR6 SiegeRocket LeagueEA FCFree FireHaloiGamingWiki
CS2

Valve's CS2 update adds hostage scripting, GameRules export for mapmakers

The October 22 patch also adds asset precaching, console command access and radar elements for all game modes.

Marcus Lane
SENIOR ESPORTS EDITOR · OCTOBER 23, 2026
Valve's CS2 update adds hostage scripting, GameRules export for mapmakers

Valve released a Counter-Strike 2 update on October 22 focused entirely on expanding the game's map scripting capabilities.

The patch introduces a new CSHostage class that allows scripts to track when a hostage is being picked up, carried or rescued, and identify the player involved. "It can also return the player who rescued it, plus the exact start and finish times of a pickup," the notes state. Six new event hooks fire at each step: OnHostagePickUpStart, OnHostagePickUpAbort, OnHostagePickUp, OnHostageDrop, OnHostageRescue and OnHostageKill. A matching CSPlayerPawn.GetHostage function tells a script which hostage a player is holding.

"What does that unlock? A creator could build a timed escort mode, award money for a clean rescue, or punish a team that loses a hostage halfway to the zone. None of that was possible from script before this week," the notes explain.

Round and match controls have been consolidated under a new top-level GameRules export, which includes functions like StartWarmup, EndWarmup, GetTeamScore, AddTeamScore, TerminateRound and AddTeamMoney. Several functions that were previously on the Instance object, such as IsWarmupPeriod, GetRoundsPlayed and SetRoundRemainingTime, have moved to GameRules and are now flagged as deprecated.

A new Console export collects convar getters for booleans, numbers, strings, vectors, angles and colours, along with ClientCommand, ServerCommand and RegisterCheatCommand. "The notable one is Console.SetConvar, which Valve says is not restricted by sv_cheats," according to the notes. The Instance.Msg function has been renamed Console.Log.

Mapmakers can now preload assets with the new Instance.Precache call, which returns a CSPrecache object. "Mapmakers can check whether an asset is loading or loaded on the server, on each client, or for every connected player," the notes state. A Release method frees the asset when the map no longer needs it.

The radar_element entity, which previously only worked in the Rush game mode, now draws in all game modes. Two new layout classes, HUD_TEAMMENU_VISIBLE and HUD_CHAT_VISIBLE, allow custom HUDs to react when the team menu or chat is open.

This is the second patch in eight days, following a quality-of-life update for the demo viewer on October 14. Valve has been gradually expanding the CS2 scripting API, which runs on a JavaScript system called cs_script, since its introduction. A year ago, a September 2025 update added round, bomb and gunfire event hooks, and an August 2026 update brought custom HUDs and cameras. Redington Cybersport reported in October that BC.Game coach TaZ criticized Valve's timing of a new regional rule for the CS2 Major.

Server owners using deprecated Instance calls should plan to move them to GameRules and Console before Valve eventually removes the old names.

More in CS2