Difference between revisions of "GetNthPlayerSpell"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Haama
(Created (hard to talk about a bug without an example))
 
imported>DragoonWraith
(MI)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
GetNthPlayerSpell - returns the nth player 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.
A command for [[:Category:Oblivion Script Extender|Oblivion Script Extender]]
        (spell:ref) GetNthPlayerSpell whichSpell:long
 
'''Syntax:'''
  (spell:ref) GetNthPlayerSpell whichSpell:long
 
  (spell:ref) GetNthSpell whichSpell:long
 
Returns the nth player spell.


==Notes==
==Notes==
Might have the same problem with reference-less calls that [[GetPlayerSpellCount]] does.
*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.
*Might have the same problem with reference-less calls that [[GetPlayerSpellCount]] does.


==See Also==
==See Also==
* [[GetNthSpell]]
* [[GetNthSpell]]
[[Category: Functions]]
[[Category: Functions (OBSE)]]
[[Category: Magic Functions]]
[[Category: Magic Functions (OBSE)]]
[[Category: Magic Functions - Magic Item (OBSE)]]
[[Category: Player Functions]]
[[Category: Player Functions (OBSE)]]
[[Category: Record Variable Functions]]
[[Category: Record Variable Functions (OBSE)]]

Latest revision as of 20:19, 1 March 2008

A command for Oblivion Script Extender

Syntax:

(spell:ref) GetNthPlayerSpell whichSpell:long
(spell:ref) GetNthSpell whichSpell:long

Returns the nth player spell.

Notes[edit | edit source]

  • 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.
  • Might have the same problem with reference-less calls that GetPlayerSpellCount does.

See Also[edit | edit source]