This entity is
not in the
FGD by default.
See below for instructions on making it available.
func_nav_blocker is a brush entity available in all
Source games since
Left 4 Dead. It is also in
Half-Life 2: Deathmatch,
Counter-Strike: Source,
Team Fortress 2, and
Black Mesa.
It blocks nav areas touching its AABB to restrict NPCs / Bots from crossing over it. func_door does something similar but allows dynamic changes without needing to recalculate the Navigation Mesh.
Note: In 
doesn't block nav areas automatically on spawn.
Keyvalues
-
Name (targetname) <string>
-
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
-
Team(s) to block (teamToBlock) <choices>
-
Team this entity should block.
- -1 : Everyone
Warning:
The value -1 is not valid and the Nav Blocker will not work. The value -2 must be used to block everyone. Fix the FGD by opening common/Team Fortress 2/bin/tf.fgd, finding "func_nav_blocker" and replacing -1 with -2, or turn off SmartEdit and set teamToBlock to -2 directly.
- 2 :
Red, 
Survivors,
Terrorists,
Combine
- 3 :
Blue, 
Infected,
Counter-Terrorists,
Rebels
Note:
teamToBlock is non-functional. The entity always blocks either both teams or no team.
-
Affects Flow? (affectsFlow) <boolean> (only in
)
-
Does this Nav Blocker block flow in the level? Only Nav Blocker with this enabled will cause flow recomputation on blocking/unblocking.
Important: If this is true, don't block the only path to the level's goal with it, otherwise the flow won't be computed properly.
-
Start Disabled (StartDisabled) <boolean> (not in

) !FGD
-
If set to false nav areas will be blocked right after spawning.
Inputs
- BlockNav
- Starts blocking nav areas.
- UnblockNav
- Stops blocking nav areas.
- Kill
- Will unblock nav areas before killing the nav blocker
FGD Code
Half-Life 2: Deathmatch
@SolidClass base(Targetname) = func_nav_blocker : "A brush entity that can block nav areas touching its AABB."
[
input BlockNav(void) : "Starts blocking nav areas."
input UnblockNav(void) : "Stops blocking nav areas."
teamToBlock(choices) : "Team(s) to block" : -1 : "Block the nav for bots on this team" =
[
-1 : "Everyone"
2 : "Combine"
3 : "Rebels"
]
]
|
Counter-Strike: Source
@SolidClass base(Targetname) = func_nav_blocker : "A brush entity that can block nav areas touching its AABB."
[
input BlockNav(void) : "Starts blocking nav areas."
input UnblockNav(void) : "Stops blocking nav areas."
teamToBlock(choices) : "Team(s) to block" : -1 : "Block the nav for bots on this team" =
[
-1 : "Everyone"
2 : "Terrorists"
3 : "Counter-terrorists"
]
]
|
See also
- func_nav_prefer will influences bots to prefer this region by decreasing the pathfinding cost within it.
- func_nav_avoid will influences bots to avoid this region by increasing the pathfinding cost within it.
- func_nav_prerequisite will instruct bots to do a task when walking within it.