Quests, Aliases, and Resets

Post » Thu Jun 21, 2012 12:40 am

I am unable to trigger the OnReset event for reference aliases and quests. I also don't think that http://www.creationkit.com/Reset_-_Quest works.

I tested with these scripts:

Spoiler
Scriptname fg109TestQuestScript extends QuestInt property MyInt = 0 AutoEvent OnReset()	Debug.Notification("Quest Reset")EndEventEvent OnInit()	RegisterForSingleUpdate(1)EndEventEvent OnUpdate()	MyInt += 1	Debug.Notification("Quest Update " + MyInt)EndEvent

Spoiler
Scriptname fg109TestAliasScript extends ReferenceAliasEvent OnReset()	Debug.Notification("Alias Reset")EndEventEvent OnInit()	RegisterForUpdate(5)EndEventEvent OnUpdate()	if !(Game.GetPlayer().IsSneaking())		GetReference().Reset()	else		int OldInt = (GetOwningQuest() as fg109TestQuestScript).MyInt		GetOwningQuest().Reset()		Debug.Notification("OldInt = " + OldInt + ", NewInt = " + (GetOwningQuest() as fg109TestQuestScript).MyInt)	endifEndEvent

Spoiler
Scriptname fg109TestMEScript extends ActiveMagicEffectQuest property TestQuest autoEvent OnEffectStart(Actor akTarget, Actor akCaster)	int OldInt = (TestQuest as fg109TestQuestScript).MyInt	if !(Game.GetPlayer().IsSneaking())		TestQuest.Stop()		TestQuest.Start()	else		TestQuest.Reset()	endif	Debug.Notification("OldInt = " + OldInt + ", NewInt = " + (TestQuest as fg109TestQuestScript).MyInt)EndEvent

I tried resetting the actor filling the alias, resetting the quest owning the alias, and stopping/starting the quest owning the alias. I also tried doing the same through console commands. None of those actions resulted in reset messages from either the quest script or the reference alias script.

Calling reset on the quest did not seem to do anything, because the integer property in the quest script remained the same. Stopping and then starting the quest did result in the integer property returning to its default value.

EDIT: If nobody chimes in to say "You're wrong you idiot!" by tomorrow, I'm going to edit the wiki pages for the reset events and functions.
User avatar
Alexander Horton
 
Posts: 3318
Joined: Thu Oct 11, 2007 9:19 pm

Post » Wed Jun 20, 2012 9:34 pm

Bumping this. I find it hard to believe that I'm the only one to have tried using OnReset in alias and quest scripts.
User avatar
JESSE
 
Posts: 3404
Joined: Mon Jul 16, 2007 4:55 am

Post » Thu Jun 21, 2012 3:20 am

I can't get any way of resetting/refilling aliases to work consistently except stopping and restarting their quest with Stop() and Start(). Finesse: that doesn't have it, I know.
User avatar
Channing
 
Posts: 3393
Joined: Thu Nov 30, 2006 4:05 pm


Return to V - Skyrim