Func nav blocker: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Added tf2 to available games list)
(SAlso, yeah I see that todo about templates to display the games, but how would go on to do that in a tidy manner?)
Line 2: Line 2:


{{todo|Any other games?}}
{{todo|Any other games?}}
 
{{todo|Use templates to display which games include this entity. (But how would we accomplish this?)}}
{{todo|Use templates to display which games include this entity.}}
{{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| For {{l4d2}}, When you make the func_nav_blocker block the navigation squares touching it, you must send UnblockNav (Yes not intuitive) along with BlockNav  if the func_nav_blocker resides on the same navigation square(s) as a [[prop_door_rotating|prop_door_rotating]] or [[func_physbox|func_physbox]] and perhaps others entities. Failure to do so will create the console error "Area navsquare# already blocked by a different team  id. May produce [[L4D_Level_Design/Nav_Flow|flow]] bugs" ( Which is does). The navigation square numbers can be seen in-game by pointing at the nav square with z_debug 1 and nav_edit 1. }}
{{bug|{{l4d2}} When you make the func_nav_blocker block the navigation squares touching it, you must send UnblockNav along with BlockNav  if the func_nav_blocker resides on the same navigation square(s) as a [[prop_door_rotating|prop_door_rotating]] or [[func_physbox|func_physbox]] and perhaps others entities. Failure to do so will create the console error "Area navsquare# already blocked by a different team  id. May produce [[L4D_Level_Design/Nav_Flow|flow]] bugs" ( Which is does). The navigation square numbers can be seen in-game by pointing at the nav square with z_debug 1 and nav_edit 1. }}




== Keyvalues ==
== Keyvalues ==
{{KV|Team(s) to block|choices|Team(s) this entity should block}}
{{KV NavBlocker}}
:* -1 : Everyone
:* 2 : {{l4d}}{{l4d2}} Survivors, {{csgo}} Terrorists
:* 3 : {{l4d}}{{l4d2}} Infected, {{csgo}} Counter-Terrorists
{{KV|Affects Flow?|boolean|Does this func_nav_blocker block flow in the level? Only func_nav_blockers with this enabled will cause flow recomputation on blocking/unblocking.}}
{{KV Targetname}}
{{KV EnableDisable}}
{{note|This KeyValue is not available in Smart Edit and must be added manually.}}
{{warning|Enabled/disabled state does ''not'' block or unblock NAV areas. Use <code>BlockNav</code>/<code>UnblockNav</code>}}
 
{{KV|Recheck Breakables|Boolean|Appears to respond to any changes to breakables even though a BlockNav/UnblockNav input is fire anyway from the breakable prop anyway.}}
{{note|This KeyValue is not available in Smart Edit and must be added manually.}}


== Inputs ==
== Inputs ==
{{IO|BlockNav|Starts blocking nav areas.|param=string}}
{{I NavBlocker}}
{{IO|UnblockNav|Stops blocking nav areas.}}
{{I Targetname}}
{{I EnableDisable}}
{{warning|Enabled/disabled state does ''not'' block or unblock NAV areas.}}


== Outputs ==
== Outputs ==
{{O Targetname}}
{{O BaseEntity}}

Revision as of 11:25, 16 March 2021

Available in Left 4 Dead Left 4 Dead 2 Counter-Strike: Global Offensive Team Fortress 2. It is a brush entity that can block 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.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 When you make the func_nav_blocker block the navigation squares touching it, you must send UnblockNav along with BlockNav if the func_nav_blocker resides on the same navigation square(s) as a prop_door_rotating or func_physbox and perhaps others entities. Failure to do so will create the console error "Area navsquare# already blocked by a different team id. May produce flow bugs" ( Which is does). The navigation square numbers can be seen in-game by pointing at the nav square with z_debug 1 and nav_edit 1.   [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