Jump to content

Is there a way to check what armor is being worn?


dePog

Recommended Posts

Yes, there is. Armor types have Keywords which you can find in the CK's Armor tab, like 'ArmorMaterialDaedric', 'ArmorMaterialGlass', (..)Ebony, etc.

 

Then you can use a function like "OnObjectEquipped" on the player to tell you what type of armor he's wearing., like:

Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference)
	if akBaseObject.Has Keyword(ArmorMaterialGlass)
	Debug.Notification("Player has equipped a glass armor piece")
	EndIf
EndEvent

Check the CK wiki about this:

 

http://www.creationkit.com/OnObjectEquipped_-_Actor and http://www.creationkit.com/HasKeyword_-_Form

Link to comment
Share on other sites

Yeah, or 'PlayerRef.WornHasKeyword(Keyword akKeyword)'... It's funny how functions come to my mind when I don't need them and it can take me so long to find some others I'm looking for... ;)

Link to comment
Share on other sites

  • Recently Browsing   0 members

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