Skip to content

CS2 map scripts can now track hostages and control the round

The October 22, 2026 update is for map makers. Map scripting adds a hostage object, dedicated Console and GameRules namespaces, and checks for resource precaching.

CasewayCaseway
4 min231
CS2 map scripts can now track hostages and control the round
Share

The main part of the patch focuses on hostage mode. Each hostage is now a separate CSHostage object, and maps can track every step, from the first pickup attempt to a rescue or death.

Important

If you only play matchmaking, nothing has changed for you in-game. The October 22 changelog has a single section: MAP SCRIPTING. The new features will come to Workshop maps and custom modes once their creators update the scripts.

Hostages are no longer just silent models

CSHostage now has the IsBeingPickedUp, IsBeingCarried, and IsRescued methods. Scripts can check whether a hostage is being picked up, carried, or has reached a rescue zone. GetRescuer identifies the rescuer, while GetPickUpStartTime and GetPickUpFinishTime return when the pickup started and ended. There’s also CSPlayerPawn.GetHostage, so scripts can check the connection from the player’s side.

The new methods also come with events that maps can respond to right away.

  • OnHostagePickUpStart fires when a player starts picking up a hostage.
  • OnHostagePickUpAbort fires when a pickup is interrupted.
  • OnHostagePickUp fires when a player picks up a hostage.
  • OnHostageDrop fires when a hostage is dropped.
  • OnHostageRescue fires when a hostage is rescued.
  • OnHostageKill fires when a hostage dies.

For example, a map maker can award points for a rescue or trigger an alarm at the Terrorist spawn when the CTs pick up a hostage.

Console and GameRules take over some of Instance’s work

Valve has added two new top-level namespaces. Console now handles everything related to console variables. Scripts can read a value in the right format with GetConvarBoolean, GetConvarNumber, GetConvarString, GetConvarVector, GetConvarQAngle, or GetConvarColor, then write one with SetConvar. SetConvar isn’t restricted by sv_cheats and runs synchronously, so the new value takes effect on the very next line of the script.

BeforeAfter
Instance.MsgConsole.Log
Instance.ClientCommand, ServerCommand, RegisterCheatCommandThe same methods in Console
Instance.IsWarmupPeriod, IsFreezePeriod, IsTeamIntroPeriodThe same methods in GameRules
Instance.GetRoundsPlayed, GetRoundRemainingTime, SetRoundRemainingTimeThe same methods in GameRules
Instance.AddTeamMoneyGameRules.AddTeamMoney

GameRules also gets new methods of its own. StartWarmup and EndWarmup start and stop warmup, GetTeamScore and AddTeamScore read and change a team’s score, and TerminateRound ends the round. Map scripts can now decide for themselves when a round is over.

The old names still work, but they’re marked as deprecated. The rename is straightforward, so it’s easier to update the calls now, before there are too many in the project.

Scripts can check whether every player has loaded the resources

Instance.Precache returns a CSPrecache object. IsServerLoading and IsServerLoaded show whether a resource is loading or loaded on the server; IsClientLoading and IsClientLoaded do the same for the client. IsLoadedForAll checks whether it’s ready for every player. When the resource is no longer needed, Release frees it.

HUD, radar, and fixes

The rest of the patch brings smaller tweaks and fixes. Custom HUD layouts (custom_hud_layout) now have two top-level classes, HUD_TEAMMENU_VISIBLE and HUD_CHAT_VISIBLE. A layout can use them to change when the team select menu or chat is open. The radar_element now appears on the radar in every mode, not just Rush.

  • GameRules.AddTeamMoney no longer crashes the game if you pass CSTeamMoneyReason.NONE as the reason.
  • The CSTeamMoneyReason and CSWeaponAttackType enum values now match the type descriptions in point_script.d.ts.
  • CSRadarPoint.IsVisibleToTeam and CSObservablePoint.IsObservableForTeam now return a boolean instead of a number.
  • Log warnings now include the JavaScript call stack and details about invalid arguments. Arguments are numbered from 0 instead of 1.
Terms in this article
Convar
A game console variable, such as a server or client setting, that can be read and changed.
sv_cheats
A server setting that must be enabled to use some console commands.
Precache
Loading models, sounds, and other resources before they’re needed in-game.
CS2 Workshop Maps for September 2026: Aim Training, Co-op, and Unusual ModesGuides
Read alsoCS2 Workshop Maps for September 2026: Aim Training, Co-op, and Unusual ModesWe picked 11 new maps from September and three maps from previous months that are still near the top of the popularity charts. You’ll find aim training, a co-op tower clear, a physics sandbox, and familiar maps with a twist on the rules.CasewayCasewayRoundupRead
Found a mistake or inaccuracy?Select text on the page and press Ctrl+Enter to add it to your message automatically.
Share
Caseway
CasewayEditorial Team

Caseway blog editorial team: CS2 skin market news and breakdowns, guides, and item Wiki.

91 articles on the blogAll articles by this author
Caseway casesCS2 cases on Caseway155 cases, from $0.75All cases
See all articles