# Create Objective For Players
Grammar — Create a state primary|Primary/Secondary objective for players with text name and description description
Flags —Native
|Action
Creates an objective. Objectives appear in the upper left corner of the UI, and are can be used to create goals for players to accomplish.
# Arguments
text
— Texttext
— Descriptionint
<preset::ObjectiveState> — Statebool
<preset::Objective_Type> — Typeplayergroup
— Players
Returns — int
<objective>
native int ObjectiveCreateForPlayers(
text inName,
text inDescription,
int inState,
bool inPrimary,
playergroup inPlayers,
);
# Related
Category: Objective / Basic
- Create Objective —
int
<objective> — ObjectiveCreate - Create Objective For Players —
int
<objective> — ObjectiveCreateForPlayers - Show/Hide Objective —
void
— ObjectiveShow - Set Objective State —
void
— ObjectiveSetState - Last Created Objective —
int
<objective> — ObjectiveLastCreated - Objective Is Visible —
bool
— ObjectiveVisible - Objective State —
int
<preset::ObjectiveState> — ObjectiveGetState
# Examples
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/StartingExperienceLib.galaxy:4225
TriggerEnable(TriggerGetCurrent(), false);
SoundPlayForPlayer(SoundLink("UI_Game_Tutorial_Veteran_Challenge_Received", -1), c_maxPlayers, PlayerGroupAll(), 100.0, 0.0);
ObjectiveCreateForPlayers(StringExternal("Param/Value/lib_StEx_5B6142CE"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER));
libStEx_gv_objectives.lv_objectivePickOneTalent = ObjectiveLastCreated();
Wait(2.0, c_timeReal);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/StartingExperienceLib.galaxy:4285
TriggerEnable(TriggerGetCurrent(), false);
SoundPlayForPlayer(SoundLink("UI_Game_Tutorial_Veteran_Challenge_Received", -1), c_maxPlayers, PlayerGroupAll(), 100.0, 0.0);
ObjectiveCreateForPlayers(StringExternal("Param/Value/lib_StEx_8287F3F2"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER));
libStEx_gv_objectives.lv_objectivePickRemainingTalentsAndReady = ObjectiveLastCreated();
Wait(2.0, c_timeReal);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/StartingExperienceLib.galaxy:4337
TriggerEnable(TriggerGetCurrent(), false);
SoundPlayForPlayer(SoundLink("UI_Game_Tutorial_Veteran_Challenge_Received", -1), c_maxPlayers, PlayerGroupAll(), 100.0, 0.0);
ObjectiveCreateForPlayers(StringExternal("Param/Value/lib_StEx_F74901E6"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER));
libStEx_gv_objectives.lv_objectiveTargetDummy = ObjectiveLastCreated();
ObjectiveCreateForPlayers(StringExternal("Param/Value/lib_StEx_5555D85A"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER));
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/StartingExperienceLib.galaxy:4339
ObjectiveCreateForPlayers(StringExternal("Param/Value/lib_StEx_F74901E6"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER));
libStEx_gv_objectives.lv_objectiveTargetDummy = ObjectiveLastCreated();
ObjectiveCreateForPlayers(StringExternal("Param/Value/lib_StEx_5555D85A"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER));
libStEx_gv_objectives.lv_objectiveGraveGolemFightUtherMustSurvive = ObjectiveLastCreated();
Wait(2.0, c_timeReal);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/StartingExperienceLib.galaxy:4421
TriggerEnable(TriggerGetCurrent(), false);
SoundPlayForPlayer(SoundLink("UI_Game_Tutorial_Veteran_Challenge_Received", -1), c_maxPlayers, PlayerGroupAll(), 100.0, 0.0);
ObjectiveCreateForPlayers(StringExternal("Param/Value/lib_StEx_9BB8C802"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER));
libStEx_gv_objectives.lv_objectiveGraveGolemFight = ObjectiveLastCreated();
ObjectiveCreateForPlayers(StringExternal("Param/Value/lib_StEx_934B8C2E"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER));
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/StartingExperienceLib.galaxy:4423
ObjectiveCreateForPlayers(StringExternal("Param/Value/lib_StEx_9BB8C802"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER));
libStEx_gv_objectives.lv_objectiveGraveGolemFight = ObjectiveLastCreated();
ObjectiveCreateForPlayers(StringExternal("Param/Value/lib_StEx_934B8C2E"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER));
libStEx_gv_objectives.lv_objectiveGraveGolemFightUtherMustSurvive = ObjectiveLastCreated();
Wait(2.0, c_timeReal);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/StartingExperienceLib.galaxy:4505
TriggerEnable(TriggerGetCurrent(), false);
SoundPlayForPlayer(SoundLink("UI_Game_Tutorial_Veteran_Challenge_Received", -1), c_maxPlayers, PlayerGroupAll(), 100.0, 0.0);
ObjectiveCreateForPlayers(StringExternal("Param/Value/lib_StEx_3D982619"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER));
libStEx_gv_objectives.lv_objectiveMoshPitFight = ObjectiveLastCreated();
ObjectiveCreateForPlayers(StringExternal("Param/Value/lib_StEx_2115A74F"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER));
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/StartingExperienceLib.galaxy:4507
ObjectiveCreateForPlayers(StringExternal("Param/Value/lib_StEx_3D982619"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER));
libStEx_gv_objectives.lv_objectiveMoshPitFight = ObjectiveLastCreated();
ObjectiveCreateForPlayers(StringExternal("Param/Value/lib_StEx_2115A74F"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER));
libStEx_gv_objectives.lv_objectiveMoshPitTeamMustSurvive = ObjectiveLastCreated();
Wait(2.0, c_timeReal);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/StartingExperienceLib.galaxy:4591
TextExpressionSetToken("Param/Expression/lib_StEx_96525700", "A", StringExternal("Param/Value/lib_StEx_F497BCEA"));
TextExpressionSetToken("Param/Expression/lib_StEx_96525700", "B", IntToText(libStEx_gv__1D_WaveTotal_C));
ObjectiveCreateForPlayers(TextExpressionAssemble("Param/Expression/lib_StEx_96525700"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER));
libStEx_gv_objectives.lv_objectiveDefendKeep = ObjectiveLastCreated();
ObjectiveCreateForPlayers(StringExternal("Param/Value/lib_StEx_B1611DE6"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER));
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/StartingExperienceLib.galaxy:4593
ObjectiveCreateForPlayers(TextExpressionAssemble("Param/Expression/lib_StEx_96525700"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER));
libStEx_gv_objectives.lv_objectiveDefendKeep = ObjectiveLastCreated();
ObjectiveCreateForPlayers(StringExternal("Param/Value/lib_StEx_B1611DE6"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER));
libStEx_gv_objectives.lv_objectiveDefendKeepVallaMustSurvive = ObjectiveLastCreated();
Wait(2.0, c_timeReal);