Skip to content

dotthegod/CS2-npc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

CS2-npc

This script enables smart NPC movement in Counter-Strike 2 using a dynamic navmesh. NPCs (spawned from a point_template) use a navmesh generated at runtime—seeded from an info_target named npc_walkable—to pathfind to player pings.

  • Ramp Preference: NPCs prefer ramps and smooth inclines, but can climb ledges if no ramp is available.
  • Edge & Drop Avoidance: Pathfinding cost increases near map edges and drop-offs, so NPCs avoid dangerous areas.
  • Seeded Navmesh: Only areas connected to the npc_walkable seed are walkable.
  • Debug & Control: Use chat commands:
    • generate_navmesh — Build navmesh
    • navmesh_debug — Visualize navmesh for 10 seconds
    • reset — Reset NPC and navmesh
  • Configurable: All movement and navmesh parameters are easily adjustable in the script.

Place a point_template with a prop_dynamic named npc and an info_target named npc_walkable in your map to get started.

About

Walkable NPC script for CS2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published