# Objective Primary

Grammarobjective is primary
FlagsNative | Function

Returns true if the objective is a primary objective.

# Arguments

  • int<objective> — Objective

Returns — bool

native bool ObjectiveGetPrimary(int inObjective);

Category: Objective / Advanced

# Examples

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:4521

    libCamp_gv_tS_MissionObjObjective[lv_objIndex] = lp_objective;
    libCamp_gv_tSX_MissionObjName[lv_objIndex] = lp_objectiveName;
    libCamp_gv_tSX_MissionObjIsPrimary[lv_objIndex] = ObjectiveGetPrimary(lp_objective);
}

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:4722

            lv_objective = libCamp_gv_tS_MissionObjObjective[(lv_obj)];
            if ((lv_objective != c_invalidObjectiveId)) {
                libCamp_gv_tSX_MissionObjIsPrimary[(lv_obj)] = ObjectiveGetPrimary(lv_objective);
                auto5A9BDEA2_val = ObjectiveGetState(lv_objective);
                if (auto5A9BDEA2_val == c_objectiveStateActive) {