spacefiddle Posted January 11, 2017 Share Posted January 11, 2017 TL;DR Fixed - using self. instead of the variable I cast as an ObjectReference seems to have gotten it working again. I keep seeing in my logserror: Cannot check for a None keywordas the result of this part of a script:Event OnEquipped(Actor akActor) armorPiece = self as ObjectReference RegisterForHitEvent(akActor) Debug.Trace( "SCARCITY: " + armorPiece + " equipped, registered for hits on " + akActor ) if armorPiece.HasKeyword(ap_PowerArmor_LLegMod) ...more stuff... This is attached to every PA piece; to use one script for all of them, it needs to identify which bodypart it's for when it's equipped.I'd rather not have to make six versions of the silly thing, one for each piece, applied to all PA =/ Before trying to use the attach point, I was using the basic keywords like dn_PowerArmor_Torso for each piece. Same error. Thanks! Update: I tried switching toif playerRef.WornHasKeyword(dn_PowerArmor_LeftLeg)and now I'm getting "error: Cannot check worn items against a None keyword," which I don't get at all. So it's not the functions - either one, probably - but somehow it seems to be unable to read the keywords, suddenly. I think I need to figure out why it's not reading the keywords, and then the first method will work... I tried it to test, but using Worn will only identify the player has the piece on, not necessarily that *this* object running this instance of the script is that piece. Very weird. Update: Fixt! I think. The problem may have beenarmorPiece = self as ObjectReference if armorPiece.HasKeyword(dn_PowerArmor_LeftLeg) Well, turns out that this item doesn't like being cast as an ObjectReference when it's checking for keywords; using insteadif self.HasKeyword(dn_PowerArmor_LeftLeg) seems to be working. It wants the Form, not the inaccessible reference of an inventory item. Link to comment Share on other sites More sharing options...
steve40 Posted January 12, 2017 Share Posted January 12, 2017 TL;DR Fixed - using self. instead of the variable I cast as an ObjectReference seems to have gotten it working again. I keep seeing in my logs error: Cannot check for a None keyword The error is telling you that you haven't filled the keyword Property. Link to comment Share on other sites More sharing options...
spacefiddle Posted January 13, 2017 Author Share Posted January 13, 2017 Yeah, thanks for confirming that - I made so many changes flailing around trying to fix it, then when I finally realized I hadn't updated the script properties in the quest for over an hour, I was no longer sure what the root cause was -_- Link to comment Share on other sites More sharing options...
Recommended Posts