Difference between revisions of "ScriptEffectStart"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Tegid
imported>Shademe
(Removed byline)
 
(16 intermediate revisions by 9 users not shown)
Line 4: Line 4:
Special block type used only by Magic Effect scripts. This block will run on the first iteration of a scripted spell effect.  
Special block type used only by Magic Effect scripts. This block will run on the first iteration of a scripted spell effect.  


If this is the result of a weapon enchantment, it will run on the affected entity not the weapon or actor that owns the weapon. (This may be true for ALL spell effects)
The fact that Script Effect Spells run on whoever has been hit by the spell, basically gives the programmer the ability to apply a script on any Actor in the game for a period of time, and can be used for getting Actor reference and many other effects. But keep in mind that spells will only work on actors, containers, or doors; the last two being for unlock spells. Dead actors also work, but the update block only runs for a few frames.
[[Category: Commands]]
 
Note: When a scripted effect is used as a weapon enchantment effect, the effect will take place '''AFTER''' the weapon hits (ie. The weapon damage will occur before the scripted effect). This means that the scripted effect can be used for soul trap like effects that need to occur after death.
 
 
== Constant Enchantments ==
Unfortunately, this block won't fire when used as a scripted effect for constant (apparel) enchantments.  If you have access to the item script, you can emulate the functionality by using the OnEquip block of the item itself.
 
Edit: This also seems to apply to abilities. The use of a Gamemode block (as ScriptEffectUpdate is also unreliable in abilities) with a DoOnce condition gets around this.
 
==See Also==
[[ScriptEffectUpdate]]
 
[[ScriptEffectFinish]]
 
[[Category: Blocktypes]]

Latest revision as of 11:09, 13 September 2012

Usage

 begin ScriptEffectStart 

Special block type used only by Magic Effect scripts. This block will run on the first iteration of a scripted spell effect.

The fact that Script Effect Spells run on whoever has been hit by the spell, basically gives the programmer the ability to apply a script on any Actor in the game for a period of time, and can be used for getting Actor reference and many other effects. But keep in mind that spells will only work on actors, containers, or doors; the last two being for unlock spells. Dead actors also work, but the update block only runs for a few frames.

Note: When a scripted effect is used as a weapon enchantment effect, the effect will take place AFTER the weapon hits (ie. The weapon damage will occur before the scripted effect). This means that the scripted effect can be used for soul trap like effects that need to occur after death.


Constant Enchantments[edit | edit source]

Unfortunately, this block won't fire when used as a scripted effect for constant (apparel) enchantments. If you have access to the item script, you can emulate the functionality by using the OnEquip block of the item itself.

Edit: This also seems to apply to abilities. The use of a Gamemode block (as ScriptEffectUpdate is also unreliable in abilities) with a DoOnce condition gets around this.

See Also[edit | edit source]

ScriptEffectUpdate

ScriptEffectFinish