Need Debugging Help, Please

Post » Thu Jun 21, 2012 12:30 pm

I have a trigger box that is supposed to enable a linked ref and start a quest.

It is also supposed to disable the linked ref and stop the quest on exit.

Starting the quest seems to work. At least the debug message pops up to say so.

But when leaving the trigger everything seems to work except the quest doesn't seem to be running in order to turn it off, but it seems to me that the quest should still be running.

Here's the script:

Scriptname LBGDisableExitEnableEnter extends ObjectReference  {Disables LinkedRef(s) on player exit, and re-enables them on enter.Also starts quest on entrance and stops quest on exit.}Quest Property myQuest Auto{ The name of your quest to start/stop }bool Property shouldFade = TRUE Auto{Whether the links should fade or not when enabled/disabled.  Defaults to TRUE.}EVENT onTriggerEnter(objectReference triggerRef)    if triggerRef == Game.GetPlayer() as actor            if myQuest.isRunning() == FALSE                myQuest.Start();debug.messagebox("Quest started!")            endif        ObjectReference MyLink = GetLinkedRef()        MyLink.Enable(shouldFade)    endifendEVENTEVENT onTriggerLeave(objectReference triggerRef)    if triggerRef == Game.GetPlayer() as actor            if myQuest.isRunning() == TRUE                myQuest.Stop()                debug.messagebox("Quest stopped!")            endif        ObjectReference MyLink = GetLinkedRef()        MyLink.Disable(shouldFade)    endifendEVENT

The debug message in the onTriggerLeave event should be triggered.

Any ideas?

Thanks for your time :)
User avatar
Jennifer Rose
 
Posts: 3432
Joined: Wed Jan 17, 2007 2:54 pm

Post » Thu Jun 21, 2012 8:19 am

I think "myQuest.Start()" isn't doing it's job

If I set the quest to start on game start, "Start Game Enabled" ticked, the debug message that says the quest has stopped triggers.

So, for some reason the quest isn't getting started.
User avatar
kat no x
 
Posts: 3247
Joined: Mon Apr 16, 2007 5:39 pm

Post » Thu Jun 21, 2012 12:35 pm

That could be because an essential alias is not being filled; or you may have forgotten to change the quest's Event back to None.
User avatar
Claire Vaux
 
Posts: 3485
Joined: Sun Aug 06, 2006 6:56 am

Post » Thu Jun 21, 2012 4:51 pm

I did have a location alias set up but the other ones are just the NPCs and the player.

I've been working on the sample quest you sent me but the lines won't compile:

Starting 1 compile threads for 1 files...Compiling "QF_LBGQuest30KeepPlayerOut_03024A1A"...d:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\QF_LBGQuest30KeepPlayerOut_03024A1A.psc(50,34): no viable alternative at input '.'d:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\QF_LBGQuest30KeepPlayerOut_03024A1A.psc(51,34): no viable alternative at input '.'d:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\QF_LBGQuest30KeepPlayerOut_03024A1A.psc(52,35): no viable alternative at input '.'d:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\QF_LBGQuest30KeepPlayerOut_03024A1A.psc(53,32): no viable alternative at input '.'d:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\QF_LBGQuest30KeepPlayerOut_03024A1A.psc(54,34): no viable alternative at input '.'No output generated for QF_LBGQuest30KeepPlayerOut_03024A1A, compilation failed.Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on QF_LBGQuest30KeepPlayerOut_03024A1A

Any idears?
User avatar
Nina Mccormick
 
Posts: 3507
Joined: Mon Sep 18, 2006 5:38 pm

Post » Thu Jun 21, 2012 2:26 pm

Oh yea....

The lines are:

Alias_Roggard.GetActorReference().EvaluatePackage()Alias_Glathor.GetActorReference().EvaluatePackage()Alias_Heedalur.GetActorReference().EvaluatePackage()Alias_Engar.GetActorReference().EvaluatePackage()Alias_Varnand.GetActorReference().EvaluatePackage()

And also:

Alias_Roggard.GetActorReference()..StartCombat(Alias_Player.GetActorReference())Alias_Glathor.GetActorReference()..StartCombat(Alias_Player.GetActorReference())Alias_Heedalur.GetActorReference()..StartCombat(Alias_Player.GetActorReference())Alias_Engar.GetActorReference()..StartCombat(Alias_Player.GetActorReference())Alias_Varnand.GetActorReference()..StartCombat(Alias_Player.GetActorReference())

EDIT

Nevermind

After posting that above I noticed the two periods

It compiled after I removed the extra period

I've always found it maddening when a lonely little comma or period can mess up a huge program lol
User avatar
Spooky Angel
 
Posts: 3500
Joined: Thu Aug 10, 2006 5:41 pm

Post » Thu Jun 21, 2012 6:52 pm

the other ones are just the NPCs and the player.

And are the NPC aliases set to allow disabled? If your NPCs are disabled when the quest starts, the aliases won't fill otherwise.
User avatar
Robyn Lena
 
Posts: 3338
Joined: Mon Jan 01, 2007 6:17 am

Post » Thu Jun 21, 2012 7:14 pm

The fragment....

NPCAlias.RegisterForSingleUpdate(8)

Does the NPC part at the beginning have to do with the alias that is set up? Or is that any NPC in general in the aliases?

Or do I have to do something like:

RoggardAlias.RegisterForSingleUpdate(8)GlathorAlias.RegisterForSingleUpdate(8)etc etc
User avatar
JD FROM HELL
 
Posts: 3473
Joined: Thu Aug 24, 2006 1:54 am

Post » Thu Jun 21, 2012 2:30 pm

And are the NPC aliases set to allow disabled? If your NPCs are disabled when the quest starts, the aliases won't fill otherwise.

The trigger box both enables the bandits and starts the quest. I should probably ensure that they are enabled first
User avatar
Nuno Castro
 
Posts: 3414
Joined: Sat Oct 13, 2007 1:40 am

Post » Thu Jun 21, 2012 12:36 pm

I changed it around so the quest is started after the bandits are enabled.

Also...when I tried to close the quest page I got an error with the line "NPCAlias.RegisterForSingleUpdate(8)"
User avatar
meg knight
 
Posts: 3463
Joined: Wed Nov 29, 2006 4:20 am

Post » Thu Jun 21, 2012 6:56 am

Another thing....

I did tick the box to Allow Disabled on each of the bandits :)
User avatar
gary lee
 
Posts: 3436
Joined: Tue Jul 03, 2007 7:49 pm

Post » Thu Jun 21, 2012 2:41 pm

NPCAlias was a property on that topic fragment. It was filled with the quest alias of my particular NPC, who had a script with an OnUpdate event that made them say 'That's long enough', and then attack. Only one of your NPCs would need to have a similar script.
User avatar
Joey Bel
 
Posts: 3487
Joined: Sun Jan 07, 2007 9:44 am

Post » Thu Jun 21, 2012 7:55 am

NPCAlias was a property on that topic fragment. It was filled with the quest alias of my particular NPC, who had a script with an OnUpdate event that made them say 'That's long enough', and then attack. Only one of your NPCs would need to have a similar script.

Ok...I found the script for that. I'll have to adjust it a little but it's good

So far everything is working except the ForceGreet within the quest. I tried the ForceGreet AI Package but he keeps following you around repeatedly greeting with the same opening line.

How do I make the built-in ForceGreet work without the periods "...." ?
User avatar
Sxc-Mary
 
Posts: 3536
Joined: Wed Aug 23, 2006 12:53 pm


Return to V - Skyrim