Jump to content

Scripting Question - Using other scripts as properties


GameWyrm

Recommended Posts

I have been given permission to update an existing mod with new features, however the mod is kind of old. The scripts don't seem to quite work right with the Creation Kit. While I can edit and compile them, and they still work in-game, I can't add anything other than basic properties. If I open the script properties panel, it gives me an error and shows up blank. The reason for this seems to be that the mod is using a deprecated method of accessing remote scripts.

 

Let's say I have two scripts. On quest QuestA, I have ScriptA, and on QuestB, I have SriptB. ScriptB holds a property (int HitCounter) that ScriptA needs in order to work. Here's how the code is currently written:

 

ScriptB Property MyScript Auto

int Property MyCounter Auto

 

...MyCounter=MyScript.HitCounter

 

While this is very useful and convenient, having code that accesses another script in this way prevents the CK from allowing me to access the properties pane - which means I can't set ScriptB.

 

Does anyone know how to either allow this existing method to work with the current CK, or a new method that does the same thing?

Link to comment
Share on other sites

Well, it turns out it was just the CK being stupid (what else is new?). Using the exact same code in a new script works, for some reason. I guess whatever data the CK was reading while loading the properties window had gotten corrupted.

 

Thanks for trying to help me, Reneer.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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