UserFunction; addObjective - HWRM/KarosGraveyard GitHub Wiki

-- Adds the named objective from the "objectives" table.
-- Modified version of the function found in the tutorial missions.
-- Arguments:
--    <sObj>: the string name of an objective. Must match a string index in the "objectives" table.
--    <bSecondary>: enter 0 (or ignore completely) for primary objective, 1 for secondary objective.
function addObjective(sObj, bSecondary)
    if (bSecondary == 1) then
        objectives[sObj].id = Objective_Add(objectives[sObj].title, OT_Secondary)
    else
        objectives[sObj].id = Objective_Add(objectives[sObj].title, OT_Primary)
    end
    if (objectives[sObj].desc) then
        Objective_AddDescription(objectives[sObj].id, objectives[sObj].desc)
    end
end

Comments

Page Status

Updated Formatting? Initial
Updated for HWRM? Initial

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