Difference between revisions of "Cross Script Variables"
Jump to navigation
Jump to search
no edit summary
imported>Bruneauinfo |
imported>Bruneauinfo |
||
Line 53: | Line 53: | ||
*The variable names listed in the script can be named whatever you like - preferably something meaningful to their purpose. | *The variable names listed in the script can be named whatever you like - preferably something meaningful to their purpose. | ||
The next part of this step is to create a quest. You can read up on the steps for creating a quest on the wiki. Just keep in mind that the only setting needed for creating this functionality is the "Script" setting under the ''Quest Data'' tab. Once you create and name your quest select your quest script from above under the ''script setting'' for the quest. (''For these examples the quest is named '''MyQuest'''''.) | |||
==== Notes ==== | |||
*You do not need to start the quest! The values within the quest can be written to and read from even if it is never started. And anyway it saves on CPU cycles. | *You do not need to start the quest! The values within the quest can be written to and read from even if it is never started. And anyway it saves on CPU cycles. | ||
=== Storing a Value === | === Storing a Value === | ||
Line 136: | Line 140: | ||
These checks would go through each possible faction and could start to get a little hard on the eyes and make trouble shooting scripts a bit more difficult. | These checks would go through each possible faction and could start to get a little hard on the eyes and make trouble shooting scripts a bit more difficult. | ||
Using the functionality discussed in this article you could store the player's faction in a quest script and just retrieve it with a few lines of code! If the player's faction | Using the functionality discussed in this article you could store the player's faction in a quest script and just retrieve it with a few lines of code! If the player's faction could switch you would just write code to change the value in the quest script. | ||
====Notes==== | |||
*The example scripts above are for proof-of-concept testing. They are simplistic for the sake of study and application. | |||
*The See Also section refers to conditionals that appear to offer the functionality discussed in this article, but '''do not'''. However, the syntax for reading and writing to a quest script was derived from notes from those articles and are worth mentioning. | |||
===See Also=== | ===See Also=== |