CurrentObjective

From Intrigues Wiki

CurrentObjective Property in Scheme Class

Overview

The CurrentObjective property in the Scheme class represents the current goal or task that needs to be accomplished as part of the scheme. It provides a specific, targeted aim for the player to focus on.

Property Definition

[field: SerializeField]
public string CurrentObjective { get; set; }

Description

  • Type: string
  • Accessibility: Publicly accessible for both getting and setting its value.

Functionality

  • The CurrentObjective property holds the immediate goal within the broader context of the scheme, guiding players on what they should focus on next.
  • It can change dynamically as the scheme progresses, reflecting new tasks or goals that emerge.

Usage

This property is utilized in game UIs and gameplay logic to display and manage the current objective of a scheme. It helps players stay informed about their immediate goals and contributes to the narrative flow of the scheme.

Example of Usage

public class SchemeObjectiveDisplay : MonoBehaviour {
    void Start() {
        // Iterate through all active schemes of the player and log their current objectives
        foreach (Scheme scheme in IM.Player.Schemes) {
            Debug.Log($"Scheme '{scheme.SchemeName}' current objective: {scheme.CurrentObjective}");
        }
    }
}

Description

  • In the Start method of the SchemeObjectiveDisplay class, this example demonstrates accessing and logging the current objective of each active scheme associated with the player.

Remarks

  • The CurrentObjective property is crucial for games with complex, multi-stage schemes, as it provides clear guidance and milestones for players.
  • It enhances the gameplay experience by adding a sense of progression and achievement as objectives are completed and updated.