Difference between revisions of "GetSpellSchool"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Quetzilla
imported>Picador
 
(3 intermediate revisions by 2 users not shown)
Line 5: Line 5:


Returns the school of the spell, determined by the most expensive effect item.
Returns the school of the spell, determined by the most expensive effect item.
{{OBSE Magic School Codes}}


==Notes==
==Notes==
* Will return 0 if passed an enchantment instead of a spell
* Will return 0 if passed an enchantment instead of a spell
* This function doesn't return the spell school as set manually in the CS: it only uses the most costly effect. Thus, for instance, scripted spell effects will return spell school 0 (Alteration) even if they are set to another school in the CS.


[[Category: Functions]]
[[Category: Functions]]
Line 13: Line 17:
[[Category: Magic Functions]]
[[Category: Magic Functions]]
[[Category: Magic Functions (OBSE)]]
[[Category: Magic Functions (OBSE)]]
[[Category: Record Variable Functions]]
[[Category: Magic Functions - Magic Item (OBSE)]]
[[Category: Record Variable Functions (OBSE)]]

Latest revision as of 23:00, 16 October 2008

A command for Oblivion Script Extender

Syntax:

(magicSchool:short) GetSpellSchool spell:ref

Returns the school of the spell, determined by the most expensive effect item.

Magic School Codes[edit source]

The following values are shorts that are used and/or returned by this function, as indicated by its Syntax. These values correspond to the listed school of magic:

 0:    Alteration
 1:    Conjuration
 2:    Destruction
 3:    Illusion
 4:    Mysticism
 5:    Restoration


Notes[edit | edit source]

  • Will return 0 if passed an enchantment instead of a spell
  • This function doesn't return the spell school as set manually in the CS: it only uses the most costly effect. Thus, for instance, scripted spell effects will return spell school 0 (Alteration) even if they are set to another school in the CS.