Function; Objective_SetState - HWRM/KarosGraveyard GitHub Wiki

Objective_SetState(<objective_ID>, <new_state>)

Description

Sets the current ObjectiveState of the given objective.

Retreive the current state of an objective with the corresponding Objective_GetState.

Example

local kill_cruiser_objective = Objective_Add("kill-battlecruiser", OT_Primary); -- `kill_cruiser_objective` will be an integer (the objective's ID)

print(Objective_GetState(kill_cruiser_objective)); -- prints `1`, which corresponds to the `OS_Incomplete` variable's value
Objective_SetState(kill_cruiser_objective, OS_Complete);
print(Objective_GetState(kill_cruiser_objective)); -- prints `2`, which corresponds to the `OS_Complete` variable's value

Arguments

Param Type Description
objective_ID number The integer ID of the object to get the state of.

Related Pages

⚠️ **GitHub.com Fallback** ⚠️