Difference between revisions of "LUA:AddQuestStepProgressAction"

(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*...")
 
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
= LUA Functions: AddQuestStepProgressAction() =
+
{{LUAFunction
Adds a function to a quest to be called whenever step progress is added. The called function will receive the params:
+
|Name = AddQuestStepProgressAction
'''([Quest*], QuestGiver [Spawn*], [Player*], progress_amount [int32])''' when this happens
+
|Description = Adds a function to a quest to be called whenever step progress is added.
 
+
|Param1 = Quest
 
+
|Param1Desc = is the quest with the step we're adding this to
==== Syntax ====
+
|Param2 = int32
AddQuestStepProgressAction(param1, param2, param3)
+
|Param2Desc = is the step id to add the function to
 
+
|Param3 = String
 
+
|Param3Desc = is a string with a function name
==== Parameters ====
+
|Example =
; 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 ====
 
 
<pre>
 
<pre>
 
function spawn(Spawn)
 
function spawn(Spawn)
 
     AddQuestStep(Quest, 1, "generic step", 4, 100, "generic step", 0)
 
     AddQuestStep(Quest, 1, "generic step", 4, 100, "generic step", 0)
     AddQuestStepCompleteAction(Quest, 1, "Step1Progress")
+
     AddQuestStepProgressAction(Quest, 1, "Step1Progress")
 
end
 
end
 
</pre>
 
</pre>
 
+
|ExampleDesc = When step 1 has progress added, the function Step1Progress() will be called in the quest's script.
When step 1 has progress added, the function Step1Progress() will be called in the quest's script.
+
|Notes = None
 +
}}

Latest revision as of 12:15, 30 January 2021


LUA:AllFunctions - AddQuestStepProgressAction

Return to: LUA:AllFunctions | Tutorials | Portal | Forum | Project Manager | Bug Tracker


Adds a function to a quest to be called whenever step progress is added.

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


Example

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

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

Notes

None