Function; Objective_GetState - HWRM/KarosGraveyard GitHub Wiki
Objective_GetState(<objective_ID>)
Description
Returns the current ObjectiveState
of the given objective.
Update this value with the corresponding Objective_SetState
.
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. |
new_state |
ObjectiveState (number ) |
The state of the objective. |