Jump to content

The keywords of a spell are the keywords of all it's magic effects?


FrankFamily

Recommended Posts

In other words, can i use HasKeyword(X) to quickly identify spells? The wiki says "If the form doesn't support keywords, it will always return false" and spells don't have a keyword box like other forms, am i right guessing it will usse all the keywords of all it's magic effects?

 

And, around the same idea, would GetNthKeyword give me the keywords in the order of the effect list (and the keyword order within them)?

Link to comment
Share on other sites

Thanks, did some testing and apparently GetNumKeywords doesn't work, i guess GetNthKeyword won't work either but even if it would getNth doens't have much use without GetNum.

 

Tested on flames that has magicdamagefire,magicinfluence and magicinfluencefear across 2 magic effects. This script returned "0/success/success/success". A bit insonsistent that Has work but Get doesn't...

 

 

 

ScriptName TEST_PlayerAliasScript extends ReferenceAlias
 
Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference)
  Spell MySpell = akBaseObject as Spell
  String KeywordList
  If (MySpell)
int index = MySpell.GetNumKeywords()
KeywordList += index as String
while index
index -= 1
Keyword Mykeyword = MySpell.GetNthKeyword(index)
KeywordList +=  ", "
KeywordList += Mykeyword.GetString()
endwhile
If MySpell.HasKeywordString("magicdamagefire")
KeywordList += "/success"
Endif
If MySpell.HasKeywordString("magicinfluence")
KeywordList += "/success"
Endif
If MySpell.HasKeywordString("magicinfluencefear")
KeywordList += "/success"
Endif
  EndIf
Debug.Messagebox(KeywordList)
EndEvent

 

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...