Difference between revisions of "GetMagicEffectCode"

96 bytes added ,  18:51, 4 October 2010
m
no edit summary
imported>JRoush
(Notes on missing formIDs)
imported>JRoush
m
 
Line 14: Line 14:
  Set mylongvar to (GetMagicEffectCode myrefvar)
  Set mylongvar to (GetMagicEffectCode myrefvar)


* When used on Magic Effects without FormIDs the script will not compile correctly (although it does not produce any error messages).  With Oblivion.esm loaded, the effects DISE, DUMY, and RSWD do not have formIDs.  Without Oblivion.esm loaded, ''no magic effects'' have formIDs.  Note that even if you modify the effect to give it a formID, ''the script still will not run correctly''Use magic effect codes directly to avoid this problem:
* When used on Magic Effects without FormIDs the script will not compile correctly (although it does not produce any error messages).  With Oblivion.esm loaded, the effects DISE, DUMY, and RSWD do not have formIDs.  Without Oblivion.esm loaded, ''no magic effects'' have formIDs.  Modifying the effect to give it a formID will not fix the problemTo avoid this, use magic effect codes directly or use the [[MagicEffectCodeFromChars]] function:


  Set mylongvar to 1195657542 ;; literal effect code for FIDG - will always work
  Set mylongvar to 1195657542 ;; literal effect code for FIDG - will always work
Set mylongvar to MagicEffectCodeFromChars "FIDG" ;; FIDG is a string instead of an editorID


[[Category:Functions]]
[[Category:Functions]]
Anonymous user