# Objective Primary
Grammar — objective is primary
Flags —Native
|Function
Returns true if the objective is a primary objective.
# Arguments
int
<objective> — Objective
Returns — bool
native bool ObjectiveGetPrimary(int inObjective);
# Related
Category: Objective / Advanced
- Set Objective Priority —
void
— ObjectiveSetPriority - Set Objective Description —
void
— ObjectiveSetDescription - Set Objective Players —
void
— ObjectiveSetPlayerGroup - Set Objective Text —
void
— ObjectiveSetName - Set Objective Type —
void
— ObjectiveSetPrimary - Move Objective to Beginning —
void
— ObjectiveSetLast - Move Objective to End —
void
— ObjectiveSetFirst - Move Objective to after Objective —
void
— ObjectiveSetAfter - Move Objective to before Objective —
void
— ObjectiveSetBefore - Objective Text —
text
— ObjectiveGetName - Objective Description —
text
— ObjectiveGetDescription - Objective Players —
playergroup
— ObjectiveGetPlayerGroup - Objective Primary —
bool
— ObjectiveGetPrimary - Objective Priority —
int
— ObjectiveGetPriority - Destroy Objective —
void
— ObjectiveDestroy - Destroy All Objectives —
void
— ObjectiveDestroyAll
# Examples
campaigns/libertystory.sc2campaign — base.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.sc2campaign — base.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) {