Difference between revisions of "Magic effect scripts"

206 bytes added ,  13:04, 8 October 2008
→‎Notes: fixed the list, added note about other blocktypes
imported>Haama
(Removed errornous note about blocktypes)
imported>DragoonWraith
(→‎Notes: fixed the list, added note about other blocktypes)
Line 18: Line 18:


==Notes==
==Notes==
 
<ul><li>Scripted spells will run on corpses, containers, doors, and furniture, but will simply run through the entire script once, regardless of the duration of the spell. All three blocktypes, ScriptEffectStart, ScriptEffectUpdate, and ScriptEffectFinish will run.
*Scripted spells will run on corpses, containers, doors, and furniture, but will simply run through the entire script once, regardless of the duration of the spell. All three blocktypes, ScriptEffectStart, ScriptEffectUpdate, and ScriptEffectFinish will run.
<li>Scripted spells behave unpredictably when running on an actor outside of the currently loaded cell. Some confirmed issues are as follows:<ul><li>Variables in the script become uninitialized;
 
<li>ScriptEffectFinish block may fail to run;
*Scripted spells behave unpredictably when running on an actor outside of the currently loaded cell. Some confirmed issues are as follows:
<li>For scripted abilities, a new instance of the script is created each time the player enters the cell with the affected actor.</ul>
:*Variables in the script become uninitialized;
:*ScriptEffectFinish block may fail to run;
:*For scripted abilities, a new instance of the script is created each time the player enters the cell with the affected actor.
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]].</ul>


==See Also==
==See Also==