Difference between revisions of "Magic effect scripts"
Jump to navigation
Jump to search
Added notes about OBSE string and array vars making save game bloating if not destroyed
imported>UDUN |
imported>Mitchalek (Added notes about OBSE string and array vars making save game bloating if not destroyed) |
||
Line 21: | Line 21: | ||
<li>For scripted abilities, a new instance of the script is created each time the player enters the cell with the affected actor.</ul> | <li>For scripted abilities, a new instance of the script is created each time the player enters the cell with the affected actor.</ul> | ||
Other bizarre results have yet to be confirmed or explained. A workaround is to add a scripted item to the actor's inventory. | Other bizarre results have yet to be confirmed or explained. A workaround is to add a scripted item to the actor's inventory. | ||
<li>Magic effect scripts are not necessarily limited to the three blocktypes above. [[MenuMode]], for example, will work, and [[GameMode]] is identical to [[ScriptEffectUpdate]] from within a scripted spell.</ul> | <li>Magic effect scripts are not necessarily limited to the three blocktypes above. [[MenuMode]], for example, will work, and [[GameMode]] is identical to [[ScriptEffectUpdate]] from within a scripted spell. | ||
<li>Using OBSE string and array variables in magic effect scripts will cause new set of variables to be created every time new instance of script is running. This will cause OBSE save game bloating so they must be uninitialized after they are used. Call [[Sv_Destruct]] for string variables and set arrays to [[Ar_Null]].</ul> | |||
==See Also== | ==See Also== |