Jump to content

Construction Set Cross-Script Variable Question


cchan0535

Recommended Posts

Hey all,

 

I'm trying to clean up a mod I like that happens to be somewhat poorly scripted. One of the major things wrong with it is that it creates a slew of global variables that it really shouldn't and I was planning on getting rid of them by using the script for an inactive quest I created as a database and reworking the rest of the mod to use it instead of the globals.

 

Problem is, I've created the database script, attached it to its quest and compiled everything, but when I try to read or write to the "database," the Construction Set complains that nothing in the database actually exists. According to the tutorial on the CS wiki (which I've quadruple checked at this point) I did everything correctly, so I don't have a clue where to go from here.

 

Any help would be greatly appreciated!

 

Thanks,

 

cchan0535

Link to comment
Share on other sites

Oblivion is a big pain when it comes to variables. It is like the programmers assumed that different scripts would almost never have to look at variables in other scripts.

 

You may wish to provide the forum with more information and post the scripts you are using.

 

The system goes sort of like this:

Quest name: AAVariableHolder

 

Quest Script on quest AAVariableHolder: AAVariableHolderSCRIPT

 

SCN AAVariableHolderSCRIPT

Short AAOgreVar
Short AAKillVar
Short TalkOnce
Float Timer2

 

Reference in another script to variable in AAVariableHolderSCRIPT:

 

Set AAVariableHolder.AAOgreVar to 1

 

Note that you use the name of the quest holding the variables. NOT the name of the script holding the variables.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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