Start Quest via Global Quest Script

Post » Mon Jun 18, 2012 2:32 pm

I have a hard time getting this to work. :bonk:

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
User avatar
Erin S
 
Posts: 3416
Joined: Sat Jul 29, 2006 2:06 pm

Post » Mon Jun 18, 2012 12:38 pm

(sigh)

I have tried:
- QuestAlias.SetStage(10)
- QuestAlias.Start()
- StartQuest Quest
- Start() from script that attached to player's alias

But none of them seem to work. Does anybody have problem starting quest from other Quest script? Or is this even possible? :(
User avatar
celebrity
 
Posts: 3522
Joined: Mon Jul 02, 2007 12:53 pm

Post » Mon Jun 18, 2012 6:26 pm

Is the combatQuest property filled in?

And check the script logs (make sure logging is enabled).
User avatar
Bethany Watkin
 
Posts: 3445
Joined: Sun Jul 23, 2006 4:13 pm

Post » Mon Jun 18, 2012 6:45 pm

Yes, I did fill the Property via Quest script tab. But that was not the problem.

The problem was because I tested on a save that already has that Quest running >.< ...... I should have read the wiki more carefully
User avatar
ShOrty
 
Posts: 3392
Joined: Sun Jul 02, 2006 8:15 pm


Return to V - Skyrim