Difference between revisions of "Cross Script Variables"
Jump to navigation
Jump to search
m
→Storing a Value
imported>Bruneauinfo (Edited the very end of the article on additional articles and see also) |
imported>Bruneauinfo |
||
Line 91: | Line 91: | ||
That's it! Now associate this script with some object that can be "activated". When the player or an actor activates the object the values listed above will be assigned to the script variables in the quest script. | That's it! Now associate this script with some object that can be "activated". When the player or an actor activates the object the values listed above will be assigned to the script variables in the quest script. | ||
It's very important to notice where quotes were used in the example script. These are '''required'''. If the quotes are not used the script will fail to work properly. Yes, the script will compile, but the values will not be written to the quest script. References as well as the reference for the quest require these quotation marks. However, in the case of a reference variable quotes are only required when setting the value of the reference variable. | It's very important to notice where quotes were used in the example script. These are '''required'''. If the quotes are not used the script will fail to work properly. Yes, the script will compile, but the values will not be written to the quest script. References as well as the reference for the quest require these quotation marks. However, in the case of a reference variable - ''quotes are only required when setting the value of the reference variable''. | ||
set "MyQuest".refVar to ThisReferenceVar | set "MyQuest".refVar to ThisReferenceVar | ||
=== Reading a Value === | === Reading a Value === |