No categories assigned

LUA:AddQuestStepProgressAction

Revision as of 20:06, 6 November 2013 by Thefoof (talk | contribs) (Created page with "= LUA Functions: AddQuestStepProgressAction() = Adds a function to a quest to be called whenever step progress is added. The called function will receive the params: '''([Quest*...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

LUA Functions: AddQuestStepProgressAction()

Adds a function to a quest to be called whenever step progress is added. The called function will receive the params: ([Quest*], QuestGiver [Spawn*], [Player*], progress_amount [int32]) when this happens


Syntax

AddQuestStepProgressAction(param1, param2, param3)


Parameters

Required - param1 (Quest), param2 (int32), param3 ("string")
param1 is the quest with the step we're adding this to
param2 is the step id to add the function to
param3 is a string with a function name


Usage

function spawn(Spawn)
    AddQuestStep(Quest, 1, "generic step", 4, 100, "generic step", 0)
    AddQuestStepCompleteAction(Quest, 1, "Step1Progress")
end

When step 1 has progress added, the function Step1Progress() will be called in the quest's script.