Difference between revisions of "Cross Script Variables"
m
→Practical Applications
imported>Bruneauinfo |
imported>Bruneauinfo |
||
|
== Practical Applications ==
So one might be wondering where functionality like this might prove useful. If you're just writing simple mods this type of functionality may seem a bit excessive. But take as an example a mod where the player will only belong to one faction (''other than the player faction of course.'') Oblivion is designed assuming the player might be a member of many factions. But what if your mod
if (player.GetInFaction ''FactionRef'' == 1)
These checks would go through each possible faction and could start to get a little hard on the eyes
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 each time a script needed the information! If the player's faction could switch you would just write code to change the value in the quest script.
==Final Notes==
| |||