-
Notifications
You must be signed in to change notification settings - Fork 9
Using the plugin in non native games
A non-native game is a game that doesn't natively support the NavMesh system (ex. Half-Life 2 Deathmatch). However, with the power of SourcePawn, the plugin can take an existing .NAV file and recreate the mesh in its entirety, providing access to a NavMesh-like system for all SourceMod plugins.
For this example, we'll have Half-Life 2: Deathmatch (HL2:DM) be the target game we want to use the mesh in. Because HL2:DM doesn't have the NavMesh system, we have to create the .NAV file via another game that does. Garry's Mod is a nice candidate as it doesn't add any game-specific data.
- Counter-Strike: Global Offensive
- Counter-Strike: Source
- Team Fortress 2
- Left 4 Dead
- Left 4 Dead 2
In Garry's Mod, enter nav_generate
and let the game do its thing. After the mesh is generated, feel free to edit the mesh to your liking.
This is the best place to place it, as the maps folder is the first folder that the plugin searches for .NAV files in. In HL2DM's case, it'll be the only folder.
Having the navmesh test plugin enabled, enter sm_navmesh_show 1
in console. If everything goes right, you should be greeted with something like this.
That's it. Have fun.