public sealed class RunQueryTaskRuns an environment query now, and writes the best point to a key.
Remarks
doc 37 § Part 3's RunQuery task. It is here rather than in Vixen.Ai because it needs to know where the agent is, which is a LocalTransform and therefore Vixen.Engine's.
⚠ It finishes in one tick, and fails when nothing survived. A query is a question rather than a procedure, so a task that stayed Running while it thought would be a task the tree has to be told when to stop waiting for. Failing on an empty result is what lets a selector fall through to the branch that does not need an answer — which is the shape every cover query wants: take cover, or if there is none, run.
Fields and properties (2)
public static int StateSizeHow many bytes it needs: the run it has already done, so a retry is not a re-query.
public QueryResults ResultsWhat the last run produced. What the editor's preview and a test read.
Methods (4)
public RunQueryTask(QueryBinding binding)Runs an environment query now, and writes the best point to a key.
public void Start(in AgentContext context, Span<byte> state)Begins. Called once before the first Tick, on a zeroed span.
public ActionStatus Tick(in AgentContext context, Span<byte> state, float delta)Advances it.
public void Abort(in AgentContext context, Span<byte> state)Stops it early. The span is zeroed afterwards; this is for what is outside it.
Used by (2)
- QueryNodesVixen.Ai.Nodes
- RunQueryNodeTestsVixen.Ai.Nodes.Tests