Instead of defining the steps and goals we will use "events" or "trigger zones" as our main driving force. The event will flag a task as accomplished.
Task: An action you need to do (just like goal in v2). It can be "refuel plane" or part of "check list".
- We must link tasks to events.
- We can order tasks by declaring dependency.
- Tasks are part of Objective.
- You can't depend your task on a goal or on a task from another Objective.
- Once event is linked to a task it won't be evaluated independently.
- Independent events are good for anything you want to evaluate independently and maybe communicate to the simmer.
Example: Communicate speed or angle of attack. You can also limit simmer to specific area.
- Events are like "trigger_zone" in v2.
- Almost anything should be derived from events.
- Every event should store if plane: "enter" or "left" its boundaries (relevant to physical based events)
All logical evaluations are "script" based.
Objective: An objective is composed of its tasks. Tasks can have certain order, can be optional or mandatory. Objective is flagged as accomplished once all its mandatory tasks are accomplished. We can measure the objective progress by checking tasks accomplishments.
Goal: Can have 1 or more objectives. This is just a logical and high level achievement.
Messages/Feedback: In v2 we could send messages relative to certain "goal", which is actually based on location in X-Plane space. This way we could easily define the distance from which we want the message to be broadcast to simmer.
In v3 we try to encapsulate everything as an Event. A message event just need to know:
- Distance the plane is relative to a physical location.
- Message event can only be linked to other "event" of type "rad" or "poly", since they have physical location.
- Message will be evaluated only if its corresponding "event" is active.
- The script to evaluate a message will receive "message" as action, "distance" as distance to the event, and the dependent "event name" it is tested against.
( This can also be tested internally by the plugin and handle implicitly ).
- Every message should be flagged as broadcast so it won't repeat itself.