AlCiao Posted February 24, 2012 Share Posted February 24, 2012 (edited) So I set up a quest to start upon a spell casting, using the Start command in the magic effect. I know the quest starts, from combining the IsRunning function with a Debug.MessageBox if true, and I know the other fragments i'm putting into the quest stage are working, because I've tested some other fragments out in the same stage (this in in the Quest Stages tab of the quest). For example, putting into the stage the fragment Game.GetPlayer().Additem(Gold001, 870) works perfectly every time I cast the spell which starts the quest. However, fragments using my aliases don't do anything. I tested it with another Debug.MessageBox, this time as another fragment in the same quest stage. ObjectReference TheBody = Alias_TargetAlias.GetActorReference() if TheBody == None Debug.MessageBox("No Alias filled!")else Debug.MessageBox("Ready and accounted for")endif And after I cast the spell it always returns the message box "No Alias filled!" So what am I doing wrong? Edited February 24, 2012 by AlCiao Link to comment Share on other sites More sharing options...
jimhsu Posted February 24, 2012 Share Posted February 24, 2012 Problem here: http://www.creationkit.com/FAQ:_My_Script_Doesn%27t_Work! Please clean save. Link to comment Share on other sites More sharing options...
AlCiao Posted February 24, 2012 Author Share Posted February 24, 2012 That link goes to a blank entry? And what do you mean by clean save? Link to comment Share on other sites More sharing options...
jimhsu Posted February 24, 2012 Share Posted February 24, 2012 http://www.creationkit.com/FAQ:_My_Script_Doesn%27t_Work! fixed link. Clean save:1. Remove mod from load order2. Open game, do a save3. Add mod back to load order4. Load the save done in (2) Link to comment Share on other sites More sharing options...
AlCiao Posted February 24, 2012 Author Share Posted February 24, 2012 (edited) Thanks for the clarification. Still doesn't work, though. :( Edit: perhaps some clarification on my part would be in order. The magic effect attached to my spell has the following script: Scriptname ExplodeNearestEnemy extends activemagiceffect {As a stepping stone to SAK, this will kill the nearest actor if he is an enemy.} Event OnEffectStart(Actor akTarget, Actor akCaster) SAKquest.Start() SAKquest.SetStage(10) endEvent Quest property SAKquest auto In the Quest Data tab, Start Game Enabled and Allow Repeated Stages are both checked. Priority is 90. The two aliases I'm trying to fill are defined under Quest Alias tab as TargetAlias (defined as a Matching Reference with the single condition of IsHostiileToActor player ==1) and Player (i've used both Unique Actor player and Specific Reference PlayerRef) In the Quest Stages tab, Quest Stage 10 is checked as the Start Up Stage, and the fragments in it are the following: SAKquestProperty.Reset() SetObjectiveDisplayed(10) Alias_Player.GetActorReference().Reset() Alias_TargetAlias.GetActorReference().Kill(Game.GetPlayer()) Alias_Player.GetActorReference().Additem(Gold001, 870) Debug.MessageBox(Alias_Player.GetActorReference()) The Message Box always pops up with None. The objective is properly displayed in the journal, but nothing else happens. When I use Game.GetPlayer().Additem(Gold001, 870) here, the gold is added. Not so here. I've tried unchecking the "Start Game Enabled", but then the quest does NOT start when the spell is cast, for some odd reason. (The getstage console command returns 0.) Edited February 24, 2012 by AlCiao Link to comment Share on other sites More sharing options...
AlCiao Posted February 24, 2012 Author Share Posted February 24, 2012 Weird: it works if I duplicate an existing quest and modify it to my specifications. What I'd been doing was creating a "New" quest from scratch. Congrats, CK, on befuddling yet another shmuck. ;) Link to comment Share on other sites More sharing options...
Recommended Posts