# Objective Text
Grammar — objective text
Flags —Native
|Function
Returns the text of an objective.
# Arguments
int
<objective> — Objective
Returns — text
native text ObjectiveGetName(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/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:6344
UserDataSetInt("MissionObjective", libSwaC_gf_ZS_ObjectiveUserDataInstance(lp_objective), "Progress", 1, libSwaC_gf_MissionObjectiveItemCount(lp_objective));
ObjectiveSetState(DataTableGetObjective(true, libSwaC_gf_ZS_ObjectiveTableString(lp_objective)), c_objectiveStateCompleted);
TextExpressionSetToken("Param/Expression/lib_SwaC_DF210163", "A", ObjectiveGetName(DataTableGetObjective(true, libSwaC_gf_ZS_ObjectiveTableString(lp_objective))));
ObjectiveSetName(DataTableGetObjective(true, libSwaC_gf_ZS_ObjectiveTableString(lp_objective)), TextExpressionAssemble("Param/Expression/lib_SwaC_DF210163"));
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:2635
UserDataSetInt("MissionObjective", libVoiC_gf_PS_ObjectiveUserDataInstance(lp_objective), "Available", 1, 0);
ObjectiveSetState(DataTableGetObjective(true, libVoiC_gf_PS_ObjectiveTableString(lp_objective)), c_objectiveStateCompleted);
TextExpressionSetToken("Param/Expression/lib_VCMI_0B6E0658", "A", ObjectiveGetName(DataTableGetObjective(true, libVoiC_gf_PS_ObjectiveTableString(lp_objective))));
ObjectiveSetName(DataTableGetObjective(true, libVoiC_gf_PS_ObjectiveTableString(lp_objective)), TextExpressionAssemble("Param/Expression/lib_VCMI_0B6E0658"));
libVoiC_gf_ZS_SetObjectiveProgressData(lp_objective, libVoiC_gf_MissionObjectiveItemCount(lp_objective));
mods/missionpacks/campaigncommon.sc2mod — base.sc2data/LibCMMI.galaxy:150
UserDataSetInt("MissionObjective", libComC_gf_CC_ObjectiveUserDataInstance(lp_objective), "Available", 1, 0);
ObjectiveSetState(DataTableGetObjective(true, libComC_gf_CC_ObjectiveTableString(lp_objective)), c_objectiveStateCompleted);
TextExpressionSetToken("Param/Expression/lib_CMMI_B921F12F", "A", ObjectiveGetName(DataTableGetObjective(true, libComC_gf_CC_ObjectiveTableString(lp_objective))));
ObjectiveSetName(DataTableGetObjective(true, libComC_gf_CC_ObjectiveTableString(lp_objective)), TextExpressionAssemble("Param/Expression/lib_CMMI_B921F12F"));
libComC_gf_CC_MissionObjectiveProgressDataSet(lp_objective, libComC_gf_MissionObjectiveItemCount(lp_objective));
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:9301
UserDataSetInt("MissionObjective", libCOOC_gf_CS_ObjectiveUserDataInstance(lp_objective), "Available", 1, 0);
ObjectiveSetState(DataTableGetObjective(true, libCOOC_gf_CS_ObjectiveTableString(lp_objective)), c_objectiveStateCompleted);
TextExpressionSetToken("Param/Expression/lib_COMI_0B6E0658", "A", ObjectiveGetName(DataTableGetObjective(true, libCOOC_gf_CS_ObjectiveTableString(lp_objective))));
ObjectiveSetName(DataTableGetObjective(true, libCOOC_gf_CS_ObjectiveTableString(lp_objective)), TextExpressionAssemble("Param/Expression/lib_COMI_0B6E0658"));
libCOOC_gf_ZS_SetObjectiveProgressData(lp_objective, libCOOC_gf_MissionObjectiveItemCount(lp_objective));
mods/voidprologue.sc2mod — base.sc2data/LibA3DDD02B.galaxy:4879
UserDataSetInt("MissionObjective", libA3DDD02B_gf_PP_ObjectiveUserDataInstance(lp_objective), "Progress", 1, libA3DDD02B_gf_MissionObjectiveItemCount(lp_objective));
ObjectiveSetState(DataTableGetObjective(true, libA3DDD02B_gf_PP_ObjectiveTableString(lp_objective)), c_objectiveStateCompleted);
TextExpressionSetToken("Param/Expression/lib_A3DDD02B_DF210163", "A", ObjectiveGetName(DataTableGetObjective(true, libA3DDD02B_gf_PP_ObjectiveTableString(lp_objective))));
ObjectiveSetName(DataTableGetObjective(true, libA3DDD02B_gf_PP_ObjectiveTableString(lp_objective)), TextExpressionAssemble("Param/Expression/lib_A3DDD02B_DF210163"));
}