
Currently, I have a Global Quest (with Start Game Enable) and it runs fine.
Below is the script attached to that quest (already running)
Now I create a new quest - combatQuest - which I already set Alias in the Quest Property and this quest is NOT start Game Enable. My plan is to start this quest whenever player is enter combat.
Everything works fine and the code below runs as expected, except the line
combatQuest.start()
Is there any1 that been successful starting the quest from script like this?
Scriptname aaaQuestScriptaaa extends QuestQuest Property combatQuest autoEvent OnInit() registerForUpdate(5) gotostate("EnterCombat")endEventState EnterCombatEvent OnUpdate() if (Game.GetPlayer().GetCombatState() == 0) ;Debug.Notification("Normal State") if(combatQuest.IsRunning()) Debug.Notification("Combat Quest IS running") elseif(!combatQuest.IsRunning()) Debug.Notification("Combat Quest is NOT running") endif elseif (Game.GetPlayer().GetCombatState() >= 1) ;Debug.Notification("Player is entering Combat") if(!combatQuest.IsRunning()) Debug.Notification("Combat Quest is NOT running") combatQuest.setStage(10) ;combatQuest.start() elseif(combatQuest.IsRunning()) Debug.Notification("Combat Quest is running") endif gotoState("InCombat") endifendEventendStateState InCombatEvent OnUpdate() if (Game.GetPlayer().GetCombatState() == 1) ;Debug.Notification("Player is in combat State") if(combatQuest.IsRunning()) Debug.Notification("Combat Quest is running") endif elseif (Game.GetPlayer().GetCombatState() == 0) gotoState("leaveCombat") endifendEventendStateState leaveCombatEvent OnUpdate() ;Debug.Notification("Left Combat State") combatQuest.Stop() gotoState("EnterCombat")endEventendState
