Jump to content

Scripting help, probably very easy.


Epoch29

Recommended Posts

I got to try again, it's not that difficult of a question, just need to catch the right people on to answer it for me.

 

Or if there's a way to enable the package through a fragment, that's ultimately what I'm trying to do.

Edited by Epoch29
Link to comment
Share on other sites

  • 2 years later...

I'm not sure I follow the conversation here but the first thing that jumps out at me is that GetQuestVariable no longer works. You need to use GetVMQuestVariable.

 

http://www.creationkit.com/GetVMQuestVariable

 

If I understand the question correctly, the problem is perhaps that you have not passed the quest into the fragment. In order for scripts to refer to one another you need to add the form as a property of the original script.

 

So if I am trying to set this variable:

Scriptname AATrissDiaQScript extends Quest  Conditional

Int Property Status = 0 Auto  Conditional

in a script other than AATrissDiaQScript, I need to pass the form into the second script as a property of the first.

 

For example say I have a weapon that sets the variable Status to 1 when the weapon is equipped. That script might look like this:

Scriptname AATrissWeapon extends ObjectReference

AATrissDiaQScript property AATrissDiaQuest auto

Event OnEquipped(Actor akActor)

AATrissDiaQuest.Status = 1

endEvent

Another alternative (which I personally don't like) is to cast the quest to the script:

Scriptname AATrissWeapon extends ObjectReference

quest property AATrissDiaQuest auto

Event OnEquipped(Actor akActor)

(AATrissDiaQuest as AATrissDiaQScript).Status = 1

endEvent

The problem with this second method is that we can't tell that AATrissWeapon refers to AATrissDiaQScript without opening up the script and searching it, because only the quest appears as a property.

 

See here for the two methods.

 

http://www.creationkit.com/Variables_and_Properties_(Papyrus)#Getting_Properties_of_a_Quest_Script

Link to comment
Share on other sites

  • Recently Browsing   0 members

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