Jump to content

Creation kit, Papyrus and parent/ child communication


Recommended Posts

Hey guys, I wanted to ask for some clarification with regards to the extent the various objects within CreationKit can communicate with each other.

 

For example, A quest alias can access a function in its owning quest script with the below:

(GetOwningQuest() as QuestScript).functionName()

 

In a similar way an quest can look at an object a given alias is referencing with:

thisAlias.GetReference()

 

Is there any information as to other things that can be done?

For example:

Can an alias communicate with more than just functions in its owning quest? Could it also change the value of a variable?

Can a function located on a quest script change the value of a variable on a script that is running on an alias - or a script running on an object directly?

 

Any information would be appreciated- I cannot seem to find much on the CK around this specific query and I feel knowing about it could open up some possibilities for some mods I work on.

 

 

Link to comment
Share on other sites

If you can point a variable at something, then you can mess with it.

 

(kQuest.GetAlias(0) as MyAliasScript).iVariable = 5

 

MyReferenceScript kObject = (GetAlias(0) as ReferenceAlias).GetReference() as MyReferenceScript

If kObject

kObject.MyVariable = 3

EndIf

Link to comment
Share on other sites

  • Recently Browsing   0 members

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