# 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
- [F] —
int
[ objective ] — Create Objective — ( ObjectiveCreate ) - [F] —
int
[ objective ] — Create Objective For Players — ( ObjectiveCreateForPlayers ) - [F] —
void
— Show/Hide Objective — ( ObjectiveShow ) - [F] —
void
— Set Objective State — ( ObjectiveSetState ) - [F] —
int
[ objective ] — Last Created Objective — ( ObjectiveLastCreated ) - [F] —
bool
— Objective Is Visible — ( ObjectiveVisible ) - [F] —
int
[ preset::ObjectiveState ] — Objective State — ( ObjectiveGetState )
# Examples
# mods/heroesdata.stormmod
— StartingExperienceLib.galaxy
// L4225
ObjectiveCreateForPlayers(StringExternal("Param/Value/lib_StEx_5B6142CE"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER))
// L4285
ObjectiveCreateForPlayers(StringExternal("Param/Value/lib_StEx_8287F3F2"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER))
// L4337
ObjectiveCreateForPlayers(StringExternal("Param/Value/lib_StEx_F74901E6"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER))
// L4339
ObjectiveCreateForPlayers(StringExternal("Param/Value/lib_StEx_5555D85A"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER))
// L4421
ObjectiveCreateForPlayers(StringExternal("Param/Value/lib_StEx_9BB8C802"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER))
// L4423
ObjectiveCreateForPlayers(StringExternal("Param/Value/lib_StEx_934B8C2E"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER))
// L4505
ObjectiveCreateForPlayers(StringExternal("Param/Value/lib_StEx_3D982619"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER))
// L4507
ObjectiveCreateForPlayers(StringExternal("Param/Value/lib_StEx_2115A74F"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER))
// L4591
ObjectiveCreateForPlayers(TextExpressionAssemble("Param/Expression/lib_StEx_96525700"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER))
// L4593
ObjectiveCreateForPlayers(StringExternal("Param/Value/lib_StEx_B1611DE6"), StringToText(""), c_objectiveStateActive, true, PlayerGroupSingle(libStEx_gv_pLAYER_01_USER))