Difference between revisions of "Cross Script Variables"
no edit summary
imported>Bruneauinfo |
imported>Bruneauinfo |
||
Line 52: | Line 52: | ||
*You should NOT assign starting values to your variables. If you need to do this, do it using some other method. Setting values within this script essentially locks the value in. There may be a workaround for doing this, but more testing will be required. | *You should NOT assign starting values to your variables. If you need to do this, do it using some other method. Setting values within this script essentially locks the value in. There may be a workaround for doing this, but more testing will be required. | ||
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. | 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'''''.) | ||
=== Storing a Value === | === Storing a Value === | ||
Line 60: | Line 60: | ||
The script: | The script: | ||
<pre> | |||
Scriptname MyWritingScript | |||
ref refVar ; reference values can be stored and retrieved | |||
float floatVar ; float values can be stored and retrieved | |||
short ShortVar ; integer values can be stored and retrieved | |||
begin onActivate | |||
set "00RTKVarStorage".RemoteKey to "00ROTKWeiGuardKey"; CHANGE FOR EACH TERRITORY | |||
end | |||
</pre> | |||