Jump to content

AddKeyword Not Working?


Recommended Posts

So I'm trying to make an effect that adds a keyword to any weapons and armor added to the player's inventory while its active. Here it is:

 

Scriptname MyScript extends activemagiceffect

Keyword Property SpecialKeyword Auto

Event OnItemAdded(Form AkBaseItem, int aiItemCount, ObjectReference AkItemReference, ObjectReference AkSourceContainer)
If(AkBaseItem As Weapon)||(AkBaseItem As Armor)
AkItemReference.AddKeyword(SpecialKeyword)
EndIf
EndEvent

 

When I try to compile it I get:

"AddKeyword is not a function or does not exist"

 

 

AkItemReference is an ObjectReference, so shouldn't it work fine? or am I missing something obvious?

 

I don't really want to have to use an alias to do this

 

Does anyone know what's going on? Any help would be appreciated.

Edited by HeirOfTheSeptems
Link to comment
Share on other sites

AddKeyword is not a function native to Skyrim. It is, however, added to Papyrus for Fallout 4

Skyrim Papyrus wiki page

Fallout 4 Papyrus wiki page

 

I do not know if there are any third party script extenders that allow adding keywords via script function. I couldn't find anything within SKSE when looking. I read something about a MESKSEUtils at loverslab that had such a function, but the LL site is currently down at the time of posting and thus I cannot verify.

Link to comment
Share on other sites

Crap.. Is there any way I could Identify the specific pieces of equipment? Formlists only hold base objects, so that wouldn't work, but is there anything like that that I could do? I just need a way to let a perk know which pieces were added during this time.

Edited by HeirOfTheSeptems
Link to comment
Share on other sites

  • Recently Browsing   0 members

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