Difference between revisions of "SetScript"

130 bytes added ,  18:49, 25 January 2009
→‎Notes: Specifics for RunScriptLine usage
imported>DuggeDank
imported>Haama
(→‎Notes: Specifics for RunScriptLine usage)
**In the case of the player, however, the only method to start the script is to open the console and type in '''player.ModAV Health 0''', '''player.AddItem F 1''' or even player with the dot '''player.''' Using the functions in a script won't start the script (even '''player.con HairTint 0 0 0''')
***[[RunBatchScript]] works with a text file with a simple '''player.'''.
***For OBSE v16 and later, use '''RunScriptLine "player."'''
**Applying a script directly to NPCs and creatures follow the same rules as when applying it to the player.
***For OBSE v16 and later, use '''RunScriptLine "%q%i%q." NPCRef"'''
*As with all non-cloneform items, when you reload a game the script ref will be reset. If the object didn't have a script, then it won't have a script when you reload. If it had a different script, then it will have the different script once again.
**There is an exception - when reloading a save game in the same area. For instance, if, in your save game, the player doesn't have a script, then you set a script on the player, then reload -> the script will still be on the player.
Anonymous user