Vixen
c7401864
csharp
public sealed class RunQueryService

Runs an environment query on a schedule and keeps a key pointed at the best answer.

Read the guide page for this →

Remarks

doc 37 § Part 3's RunQuery service, and the form most trees actually want: "wherever the best cover is, keep this key on it" running under the branch that uses it, at an interval, with the deviation that stops every agent querying on the same frame.

⚠ A service that finds nothing clears the key rather than leaving the last answer there. A stale destination is the bug that makes an agent walk confidently to a spot that stopped being cover two seconds ago, and it is invisible because the key still looks perfectly reasonable. DefaultFocusService made the same decision in P4.

Fields and properties (1)

Methods (2)

  • public RunQueryService(QueryBinding binding)

    Runs an environment query on a schedule and keeps a key pointed at the best answer.

  • public override void Tick(in BehaviorContext context, Span<byte> state, float delta)

    Its interval has elapsed.

Used by (2)

  • QueryNodesVixen.Ai.Nodes
  • RunQueryNodeTestsVixen.Ai.Nodes.Tests