The latest update for Counter-Strike 2 introduces new entities, events, and features for map creators and scripters.
Match Impact and Player Notes
New Features:
- custom_hud_layout entity: This new entity allows for the creation of custom UI elements such as Panels, Labels, Images, and Buttons. It supports CSS styling and maintains state during tool mode reloads.
- cs_player_camera entity: This entity gives control over a player's view without moving their pawn, allowing for custom camera angles from a scripted position.
- New Events:
Instance.DelayInstance.OnBombPlantStartInstance.OnBombPlantAbortInstance.OnBombDefuseStartInstance.OnBombDefuseAbortInstance.OnCustomHudClickedInstance.IsDedicatedServerEntity.MoveEntity.GetMoveTypeEntity.SetMoveTypeCSPlayerPawn.GetC4CSPlayerPawn.GetDefuseTargetCSPlayerPawn.IsBuyMenuOpenCSPlayerPawn.GetCameraC4.GetPlantStartTimeC4.GetPlantFinishTimeC4.AbortPlantCustomHudLayout.SetHasClassCustomHudLayout.SetHasClassForPlayerCustomHudLayout.SetDialogVariableStringCustomHudLayout.SetDialogVariableStringForPlayerCustomHudLayout.SetInputCaptureEnabledCustomHudLayout.IsInputCaptureEnabledCSPlayerCamera.IsEnabledCSPlayerCamera.SetEnabledCSPlayerCamera.SetIsControllingAngles- CSMoveType Enum: This new enum provides a list of valid move types for the
Entity.Moveevent. - Type Corrections: Corrected parameter types for certain events to avoid undefined values.
- Error Logging: Errors during script execution and unhandled promise rejections are now logged to the console.
- CompileModule Step: The column number is added to errors caught during the CompileModule step of script loading.
- Deprecated Features:
- The
planterparameter fromInstance.OnBombPlantevent - The
defuserparameter fromInstance.OnBombDefuseevent
Player Memo:
- The new
cs_player_cameraentity offers more control over player views, which could be useful for creating unique gameplay experiences. - The new events provide more scripting options, allowing for more complex and interactive maps.
- Be aware of the deprecated features to ensure compatibility with future updates.