Jump to content

getStage in scripting


edhelsereg

Recommended Posts

I am trying to script an event where a message pops up when an activator is selected with the condition that a certain quest stage is active. This is what I wrote up but nothing is happening when I click the activator. I think the problem is in the IF line.

 

Quest Property myQST Auto

 

Event OnActivate(ObjectReference akActionRef)

 

if myQST.getStage() == 70

Debug.MessageBox("You've just clicked on an activator.")

endif

 

endEvent

Link to comment
Share on other sites

make sure the script is on the activator in question and the stage is 70. If so the script should fire. Also make sure you assigned a value to myQuest in the properties window.

 

The script is attached to a quest alias of the activator. The Quest Property is filled in appropriately . I have checked in-game, the stage is 70.

Edited by edhelsereg
Link to comment
Share on other sites

Script extends ReferenceAlias

Right.

If you know that the event actually triggers.

I guess adding some debugging on things won't hurt anyone whilst trying to get this to work.

Event OnActivate(ObjectReference akActionRef)
;Perhaps getStage() is none for some obscure reason...
debug.Notification("QStage=" + myQST.getStage())
debug.Trace("Ref=" + akActionRef + "QStage=" + myQST.getStage())
if (myQST.getStage() == 70)
	Debug.MessageBox("You've just clicked on an activator.")
endif

endEvent

Link to comment
Share on other sites

Still no message box.

Did the notification return the correct value?

i.e. 70?

 

Hang on I'll fire up the CK its hard to try to help someone blindfolded...

 

How do you mean notification? I use the console in-game to check the quest stage and it said >> 70.00

Link to comment
Share on other sites

How do you mean notification? I use the console in-game to check the quest stage and it said >> 70.00

In the upper left corner of your screen.

If you added the debug things I suggested.

It should be in your papyruslogs too.

 

Perhaps the value isn't set for some reason.

 

Talking about things that odesn't work, my CK keeps CTD:ing for no particular reason...

Link to comment
Share on other sites

  • Recently Browsing   0 members

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