Objectives

The Objectives component allows developers to define overall goals for an entire operation, evaluated upon completion.

Note

Objectives do not affect the final score of the operation.

Objective Types

  1. Score Limit:

    • Achieved if the operation or action scores equal to or exceeds a specified threshold.

  2. Same as errors except Insertion Angle Error.

  3. Custom:

    • A Custom Objective can be created by implementing the CustomObjectiveTypeDefinition class and attaching it to the UI. For example, the OperationTimeObjective class succeeds if GetRealTimeSinceStartUp() is less than the timeLimit value.

    public class OperationTimeObjective : CustomObjectiveTypeDefinition
    {
        float timeLimit = 20f;
    
        protected override void OnActionInitialize(BaseActionData baseActionData)
        {
            if (Hub.Instance.Get<SceneGraphModule>().GetActionCategory(baseActionData)
            == SceneGraphModule.ActionCategory.End)
            {
                bool success = Hub.Instance.
                Get<MAGESAnalytics>().GetRealTimeSinceStartUp() < timeLimit;
    
                TriggerObjective(success);
            }
        }
    }
    

How to Setup Objectives

Setting up Objectives follows the same process as configuring Errors. The primary difference is the inclusion of a Score Limit Objective and the removal of the Rotation Limit from errors. This tutorial focuses on the Score Limit, with the understanding that other objectives can be configured similarly. For additional details, refer to the Errors page.

Score Limit

This tutorial shows how to set a Score Limit Objective for a single Action or the entire operation. For more information regarding scoring refer to the Scoring page.

  1. In the MAGES Panel, go to Analytics Editor > Objectives, and choose Score Limit as the objective type.

    ../../../_images/objectives_panel.png
  2. Click Add new Objective to open the Objective configuration window.

  3. Set the score and action fields. The score is the target score, and the action is the target Action or the entire operation.

  4. Set a Score Limit with a score of 80 for the entire operation, name it MyScoringObjective, and click Add.

    ../../../_images/add_objective.png

Objective Preview

To review succeeded or failed Objectives after playing your operation, check the Session Overview UI generated at the operation’s end. Click on the Objectives tab to see a list of Objectives and their status.

../../../_images/operation_end_objectives.png