GetNthSpell

From the Oblivion ConstructionSet Wiki
Revision as of 09:50, 8 August 2007 by imported>Haama (Created (hard to talk about a bug without an example))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

GetNthSpell - returns the nth reference's spell. whichSpell is an index that starts at 0 for the first spell in the list. Note that the CS compiler doesn't expect spells to be returned as a ref. If you are calling this function multiple times to set the same ref variable you need to assign that variable to some other type (say a weapon) in between your calls to this function. Otherwise the ref will continue to keep the value from the first call.

       (spell:ref) reference.GetNthSpell whichSpell:long