[dismiss]
This wiki is a copy of the original Oblivion CS wiki created and maintained by the UESP.net. See CSwiki:Copy Notice for more info.
Minimizing your Script
Revision as of 18:31, 11 September 2007 by imported>Haama (Created)
Gamemode Scripts
Avoid using gamemode scripts wherever possible. Use quest scripts if you can, or try to find ways to put as much of the script work into OnLoad, OnEquip, and ScriptEffectStart blocks as possible.
If you need to use a GameMode block, use an 'if' test or a flag so the code will only run when necessary. For instance, if you need to run an item script whenever the player hits a switch, place this on the switch:
scn YourSwitchScript short Working begin onActivate set Working to 1 end
and this on the item:
scn YourItemScript begin GameMode if YourSwitchScript.Working ... endif end