Difference between revisions of "LUA:AddQuestStepFailureAction"

(Created page with "= LUA Functions: AddQuestStepFailureAction() = This will add a lua callback function for when the given step is failed ==== Syntax ==== AddQuestStepFailureAction(param1, param2...")
 
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
= LUA Functions: AddQuestStepFailureAction() =
+
{{LUAFunction
This will add a lua callback function for when the given step is failed
+
|Name = AddQuestStepFailureAction
 
+
|Description = This will add a lua callback function for when the given step is failed
 
+
|Param1 = Quest
==== Syntax ====
+
|Param1Desc = is the quest we are adding a callback function to
AddQuestStepFailureAction(param1, param2, param3)
+
|Param2 = int32
 
+
|Param2Desc = is the step we are adding a callback function for
 
+
|Param3 = string
==== Parameters ====
+
|Param3Desc = is the callback function
; Required - ''param1'' (Quest), ''param2'' (int32), ''param3'' (string)
+
|Example =
: ''param1'' is the quest we are adding a callback function to
 
: ''param2'' is the step we are adding a callback function for
 
: ''param3'' is the callback function
 
 
 
 
 
==== Usage ====
 
 
<pre>
 
<pre>
 
function Step2Complete(Quest, QuestGiver, Player)
 
function Step2Complete(Quest, QuestGiver, Player)
Line 20: Line 14:
 
end
 
end
 
</pre>
 
</pre>
 
+
|ExampleDesc = If step 3 is failed then the lua function Step3Failed will be called
If step 3 is failed then the lua function Step3Failed will be called
+
|Notes = Do not use on the same step as [[LUA:SetQuestTimer|SetQuestTimer()]] as that function will do the same thing as this function.
 
+
}}
== Notes ==
 
Do not use on the same step as [[LUA:AddQuestTimer|AddQuestTimer()]] as that function will do the same thing as this function.
 

Latest revision as of 12:16, 30 January 2021


LUA:AllFunctions - AddQuestStepFailureAction

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


This will add a lua callback function for when the given step is failed

Syntax

AddQuestStepFailureAction(param1, param2, param3)

Parameters

Required - param1 (Quest), param2 (int32), param3 (string)
param1 is the quest we are adding a callback function to
param2 is the step we are adding a callback function for
param3 is the callback function


Example

function Step2Complete(Quest, QuestGiver, Player)
    AddQuestStepFailureAction(Quest, 3, "Step3Failed")
end

If step 3 is failed then the lua function Step3Failed will be called

Notes

Do not use on the same step as SetQuestTimer() as that function will do the same thing as this function.