# Create Objective For Players

Grammar — Create a state primary|Primary/Secondary objective for players with text name and description description
FlagsNative | 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 — Text
  • text — Description
  • int [ preset::ObjectiveState ] — State
  • bool [ preset::Objective_Type ] — Type
  • playergroup — Players

Returns — int [ objective ]

native int ObjectiveCreateForPlayers(
	text inName,
	text inDescription,
	int inState,
	bool inPrimary,
	playergroup inPlayers,
);

Category: Objective / Basic

# 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))