Difference between revisions of "MagicItemHasEffect"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Haama
(Fit to box)
imported>Low Post
(Added optional actor value argument.)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
MagicItemHasEffect - returns whether the magic item has an effect item with the specifed effect. Uses the 4 letter codes for the magic effects listed in the CS.
A command for [[:Category:Oblivion Script Extender|Oblivion Script Extender]]
(hasEffect:bool) MagicItemHasEffect effect:chars magicItem:ref
 
(hasEffect:bool) MagicHasEffect effect:chars magicItem:ref
'''Syntax:'''
(hasEffect:bool) MagicItemHasEffect effect:chars magicItem:ref ''actorValue:name''
 
(hasEffect:bool) MagicHasEffect effect:chars magicItem:ref ''actorValue:name''
 
Returns whether the magic item has an effect item with the specifed effect.
 
==Notes==
* Uses the 4 letter codes for the magic effects listed in the CS.
* Using '''MagicItemHasEffect''' on a magic item that doesn't have any effects (for instance, after using [[RemoveAllEffectItems]] on the item) will cause Oblivion to crash.
** However, using '''MagicItemHasEffect''' on a non-magic item will not cause a crash.
**This has been fixed as of v0013.
*Uses an '''optional''' actor value name for use with effects like fortify skill and fortify attribute.


==See Also==
==See Also==
Line 13: Line 25:
[[Category:Magic Functions]]
[[Category:Magic Functions]]
[[Category:Magic Functions (OBSE)]]
[[Category:Magic Functions (OBSE)]]
[[Category: Magic Functions - Magic Item (OBSE)]]

Latest revision as of 19:26, 26 March 2011

A command for Oblivion Script Extender

Syntax:

(hasEffect:bool) MagicItemHasEffect effect:chars magicItem:ref actorValue:name
(hasEffect:bool) MagicHasEffect effect:chars magicItem:ref actorValue:name

Returns whether the magic item has an effect item with the specifed effect.

Notes[edit | edit source]

  • Uses the 4 letter codes for the magic effects listed in the CS.
  • Using MagicItemHasEffect on a magic item that doesn't have any effects (for instance, after using RemoveAllEffectItems on the item) will cause Oblivion to crash.
    • However, using MagicItemHasEffect on a non-magic item will not cause a crash.
    • This has been fixed as of v0013.
  • Uses an optional actor value name for use with effects like fortify skill and fortify attribute.

See Also[edit | edit source]