{% import "partials/condition_node.html" as pred %} {% import "partials/icons.html" as ic %} {# Waypoint conditions of an action that follows vertices: each one holds the entity at a vertex until its condition holds. The condition itself is an ordinary condition tree, drawn and edited with the same pieces as a trigger -- click it for its inspector, add children to a composition in place -- so nothing here knows any condition type. Only *where* it sits is new: a vertex number, counted from 1 like the lines of the vertex list. #} {% macro section(action, draft, selected, document) %}
Hold the entity at a vertex until a condition holds; then it goes on, on the trajectory's clock (paused while it waited) or at its speed. Vertices are counted from 1, as the lines of the vertex list; the last one has nothing to advance to. Checked from when the entity reaches the vertex, against the scenario's elapsed time.
{% for gate in action.advance_conditions %}Every vertex is left on the clock (or at the speed).
{% endfor %} {%- set used = action.advance_conditions|map(attribute='vertex')|list -%} {%- set ns = namespace(free=1) -%} {%- for _ in range(used|length + 1) -%}{%- if ns.free in used -%}{%- set ns.free = ns.free + 1 -%}{%- endif -%}{%- endfor -%}