Func nav blocker: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (→‎Outputs: Missed l4d tag)
m (Final touches)
Line 1: Line 1:
Available in {{l4d}} {{l4d2}} {{csgo}} {{tf2}}. It is a brush entity that can block [[NAV|nav]] areas touching its AABB used to restrict NPCs from crossing over nav areas.
{{brush ent|since=Left 4 Dead}} It blocks [[NAV|nav]] areas touching its AABB used to restrict NPCs from crossing over nav areas.
 
{{todo|Any other games?}}
{{todo|Use templates to display which games include this entity. (But how would we accomplish this?)}}
{{note|The entity will NOT start to block automatically: it must first be activated with the <code>BlockNav</code> input.}}
{{note|The entity will NOT start to block automatically: it must first be activated with the <code>BlockNav</code> input.}}
{{bug|{{l4d2}} For navigation squares touching your func_nav_blocker, if [[prop_door_rotating|prop_door_rotating]], [[func_physbox|func_physbox]], etc. resides on the same squares, UnblockNav along with BlockNav inputs.<br><br>


{{bug|{{l4d2}} For navigation squares touching your func_nav_blocker, UnblockNav along with BlockNav must be sent if [[prop_door_rotating|prop_door_rotating]], [[func_physbox|func_physbox]], etc. resides on the same squares. Else the console error "Area navsquare#[ID] already blocked by a different team id. May produce [[L4D_Level_Design/Nav_Flow|flow]] bugs" (Which it does). You can quickly access the faulty nav square by using<code>nav_mark [ID]</code>followed by <code>nav_warp_to_mark</code>. }}
Otherwise, the console errors "Area navsquare#[ID] already blocked by a different team id. May produce [[L4D_Level_Design/Nav_Flow|flow]] bugs" (Which it does). You can quickly access the faulty nav square by using<code>nav_mark [ID]</code>followed by <code>nav_warp_to_mark</code>. }}


== Keyvalues ==
== Keyvalues ==

Revision as of 12:20, 16 March 2021

Template:Brush ent It blocks nav areas touching its AABB used to restrict NPCs from crossing over nav areas.

Note.pngNote:The entity will NOT start to block automatically: it must first be activated with the BlockNav input.
Icon-Bug.pngBug:Left 4 Dead 2 For navigation squares touching your func_nav_blocker, if prop_door_rotating, func_physbox, etc. resides on the same squares, UnblockNav along with BlockNav inputs.

Otherwise, the console errors "Area navsquare#[ID] already blocked by a different team id. May produce flow bugs" (Which it does). You can quickly access the faulty nav square by usingnav_mark [ID]followed by nav_warp_to_mark.   [todo tested in ?]

Keyvalues

Team(s) to block (teamToBlock) <choices>
Team this entity should block.
  • -1 : Everyone
    Warning.pngWarning:Team Fortress 2 for everyone either edit FGD and use value -2 or turn off smart edit and set that, -1 is not valid and the nav blocker will not work
  • 2 : Red Team Fortress 2, Survivors Left 4 Dead seriesLeft 4 Dead series, Terrorists Counter-Strike: Source Counter-Strike: Global Offensive
  • 3 : Blue Team Fortress 2, Infected Left 4 Dead seriesLeft 4 Dead series, Counter-Terrorists Counter-Strike: Source Counter-Strike: Global Offensive
Note.pngNote:Counter-Strike: Global Offensive teamToBlock non-functional, always blocks either for both teams or for no team.
Affects Flow? (affectsFlow) <boolean> (only in Left 4 Dead 2)
Does this Nav Blocker block flow in the level? Only Nav Blocker with this enabled will cause flow recomputation on blocking/unblocking.
Icon-Important.pngImportant:When this is true don't block the only path to the level's goal with it or the flow won't be computed properly

Inputs

BlockNav
Starts blocking nav areas.
UnblockNav
Stops blocking nav areas.

Outputs