Difference between revisions of "Navmesh Disabling"

187 bytes removed ,  16:37, 15 December 2008
Removed unnecessary renaming of navmesh, or using said name in script.
imported>JBurgess
 
imported>Dbrigner
(Removed unnecessary renaming of navmesh, or using said name in script.)
Line 14: Line 14:
You’ll end up with something looking like Fig 1b: Blue edges mean ‘special’ navmesh portal. They only get created when you use this menu command.
You’ll end up with something looking like Fig 1b: Blue edges mean ‘special’ navmesh portal. They only get created when you use this menu command.
   
   
From the Cell View window, name the new navmesh by double clicking on it or hitting F2.  Give it a meaningful name; you'll be using this in a script.  The following two functions enable/disable a navmesh
The following two functions enable/disable a navmesh
*'''EnableNavMesh''' ''myNavmeshNameHere''
*'''EnableNavMesh''' ''NavmeshFormIDHere''
*'''DisableNavMesh''' ''myNavmeshNameHere''
*'''DisableNavMesh''' ''NavmeshFormIDHere''


You CAN’T use '''myNavmeshNameHere.enable''', nor can you have activate parents, because Navmeshes are not references.
You CAN’T use '''NavmeshFormIDHere.enable''', nor can you have activate parents, because Navmeshes are not references.


You can go on to swap this navmesh with a replacement, if your situation calls for such.  To start with, create the first navmesh like I described above Once you do, select a triangle on this new navmesh, as in Fig 1c.  Now HIDE it. Hit H to hide a navmesh, Ctrl-H to unhide Navmeshes.  Your workspace should look like Fig 1d.
You can go on to swap this navmesh with a replacement, if your situation calls for such.  To start with, create the first navmesh like I described above Once you do, select a triangle on this new navmesh, as in Fig 1c.  Now HIDE it. Hit H to hide a navmesh, Ctrl-H to unhide Navmeshes.  Your workspace should look like Fig 1d.
Line 31: Line 31:
Create more triangles for the new version (don’t worry about blue edges) as in Fig 2a.  Repeat the steps above to select this new area and separate into its own navmesh, as in Fig 2b.
Create more triangles for the new version (don’t worry about blue edges) as in Fig 2a.  Repeat the steps above to select this new area and separate into its own navmesh, as in Fig 2b.
   
   
You’ll end up with this something like Fig 2c.  Name this second navmesh as well.  Hit Ctrl-H to unhide all Navmeshes, you should see the overlapping separate navmesh objects, as in fig 2d.
You’ll end up with this something like Fig 2c.  Hit Ctrl-H to unhide all Navmeshes, you should see the overlapping separate navmesh objects, as in fig 2d.


Finalize and save.  In the game, enable one navmesh and disable the other via script, using the commands above.  Be sure that both navmesh objects are not enabled at the same time.
Finalize and save.  In the game, enable one navmesh and disable the other via script, using the commands above.  Be sure that both navmesh objects are not enabled at the same time.
Anonymous user