thesniperdevil Posted April 23, 2016 Posted April 23, 2016 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.
DavidJCobb Posted April 23, 2016 Posted April 23, 2016 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 MyReferenceScriptIf kObject kObject.MyVariable = 3EndIf
cdcooley Posted April 23, 2016 Posted April 23, 2016 You can remotely access functions and properties but not simple variables for any script as long as you have a reference to the object that holds the script.
Recommended Posts