Jump to content

My Quest aliases aren't filling!


AlCiao

Recommended Posts

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 by AlCiao
Link to comment
Share on other sites

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 by AlCiao
Link to comment
Share on other sites

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...