Func nav prerequisite: Difference between revisions
Jump to navigation
Jump to search

Note:
Kestrelguy (talk | contribs) m (→Keyvalues: removed redundant keyvalue) |
(Add VScript code to update prerequisite at runtime) |
||
Line 1: | Line 1: | ||
{{lang|func nav prerequisite}} | {{lang|func nav prerequisite}} | ||
{{tf2 brush|func_nav_prerequisite}} It is a trigger volume that requires bots to do perform a task before they can move through it. | {{tf2 brush|func_nav_prerequisite}} It is a trigger volume that requires bots to do perform a task before they can move through it. | ||
{{note|<code>func_nav_prerequisite</code> triggers are only registered by the [[Navmesh]] on round start. To register them late, the following [[VScript]] snippet can be used to force a nav mesh update. | |||
<source lang=js> | |||
RegisterScriptGameEventListener("round_start") | |||
SendGlobalGameEvent("round_start", {}) | |||
</source>}} | |||
==Keyvalues== | ==Keyvalues== |
Revision as of 04:10, 13 December 2023


Template:Tf2 brush It is a trigger volume that requires bots to do perform a task before they can move through it.

func_nav_prerequisite
triggers are only registered by the Navmesh on round start. To register them late, the following VScript snippet can be used to force a nav mesh update.
RegisterScriptGameEventListener("round_start")
SendGlobalGameEvent("round_start", {})
Keyvalues
- Task ([todo internal name (i)]) <choices>
- What must be done to move through this volume
- 1 : Destroy Entity (Value = max range to attack from. -1 for no range restriction)
Bug:In
, this task does not function. [todo tested in ?]
- 2 : Move to Entity
- 3 : Wait (Value = seconds to wait)
- Task Entity ([todo internal name (i)]) <targetname>
- The subject entity of the Task.
|
Flags
|
Inputs
|
Outputs
|
See Also
- func_nav_prefer, which influences bots to prefer this region by decreasing the pathfinding cost within it.
- func_nav_avoid, which influences bots to avoid this region by increasing the pathfinding cost within it.