Difference between revisions of "MagicItemHasEffectCountCode"
Jump to navigation
Jump to search
imported>WereWolf (Added obse link) |
imported>DragoonWraith (MI) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
A command for [[:Category:Oblivion Script Extender|Oblivion Script Extender]] | A command for [[:Category:Oblivion Script Extender|Oblivion Script Extender]] | ||
'''Syntax:''' | '''Syntax:''' | ||
Line 7: | Line 5: | ||
(effectCount:short) MagicItemHasEffectCountC effectCode:long magicItem:ref | (effectCount:short) MagicItemHasEffectCountC effectCode:long magicItem:ref | ||
Returns the count of effects with the specified effect code on the magic item. | |||
==Notes== | ==Notes== | ||
* Uses a long value returned from [[GetNthEffectItemCode]] or [[GetMagicEffectCode]]. | |||
* Using '''MagicItemHasEffectCode''' on a magic item that doesn't have any effects (for instance, after using [[RemoveAllEffectItems]] on the item) will cause Oblivion to crash. | * Using '''MagicItemHasEffectCode''' 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 | ** However, using [[MagicItemHasEffectCode]] on a non-magic item will not cause a crash. | ||
** The same is probably true for '''MagicItemHasEffectCountCode'''. | ** The same is probably true for '''MagicItemHasEffectCountCode'''. | ||
**This has been fixed as of v0013. | |||
==See Also== | ==See Also== | ||
Line 24: | Line 26: | ||
[[Category:Magic Functions]] | [[Category:Magic Functions]] | ||
[[Category:Magic Functions (OBSE)]] | [[Category:Magic Functions (OBSE)]] | ||
[[Category: Magic Functions - Magic Item (OBSE)]] |
Latest revision as of 20:17, 1 March 2008
A command for Oblivion Script Extender
Syntax:
(effectCount:short) MagicItemHasEffectCountCode effectCode:long magicItem:ref
(effectCount:short) MagicItemHasEffectCountC effectCode:long magicItem:ref
Returns the count of effects with the specified effect code on the magic item.
Notes[edit | edit source]
- Uses a long value returned from GetNthEffectItemCode or GetMagicEffectCode.
- Using MagicItemHasEffectCode 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 MagicItemHasEffectCode on a non-magic item will not cause a crash.
- The same is probably true for MagicItemHasEffectCountCode.
- This has been fixed as of v0013.