No categories assigned
LUA:SetQuestTimer
- Last edited 11 years ago by I need to Update My Profile
LUA Functions: SetQuestTimer()
Sets the timer for the given quest
Syntax
SetQuestTimer(param1, param2, param3, param4, param5)
Parameters
- Required - param1 (Quest), param2 (Spawn), param3 (int32), param4 (int32), param5 (string)
- param1 is the quest we want to set the timer for
- param2 is the player whos quest is getting the timer
- param3 is the step the timer is being set for
- param4 is the duration in seconds to set the timer for
- param5 is the lua function to call if the timer expires
Usage
function Step1Complete(Quest, QuestGiver, Player)
SetQuestTimer(Quest, Player, 2, 300, "Step2Failed")
end
This will set a timer for step 2 of this quest, if the timer expires it will call the Step2Failed lua function.
Notes
There is no need to use AddStepFailureAction() as SetQuestTimer does that automatically.