Aberrant issue with GetWornForm()

Post » Thu Jun 21, 2012 7:53 pm

I was using this function finely, but don't know what i did, it's suddenly not working anymore. And i'm pretty sure that it wrecked BEFORE i update to 1.6 and SKSE.

The function now always return None, whatever be the syntax.

if ( (PlayerRef.GetWornForm(2) as Armor) )	  Notification("Player is wearing "+(PlayerRef.GetWornForm(2) as Armor).GetName()) ; no more shownendifif ( (PlayerRef.GetWornForm(Armor.GetMaskForSlot(31)) as Armor) )	  Notification("Player is wearing "+(PlayerRef.GetWornForm(Armor.GetMaskForSlot(31)) as Armor).GetName()) ; sameendifif ( (GetPlayer().GetWornForm(2) as Armor) )	  Notification("Player is wearing "+(GetPlayer().GetWornForm(2) as Armor).GetName()) ; sameendif

I've disabled ALL lines of my script but this, verified that PlayerRef is still filled, reinstalled SKSE just in case, but no. I wear an Helmet and don't see the Notification. And, all others functions of SKSE are working normally.

Does someone have an idea about this mess ?
User avatar
Solène We
 
Posts: 3470
Joined: Tue Mar 27, 2007 7:04 am

Post » Thu Jun 21, 2012 6:16 pm

Are you sure you're looking for the correct slot? "2" is the hair slot, which I think would mean open-face helms. It might also be that the equipped item is not armor, though I don't know how that could be.
User avatar
sarah simon-rogaume
 
Posts: 3383
Joined: Thu Mar 15, 2007 4:41 am

Post » Thu Jun 21, 2012 2:18 pm

Yep, sure. Helmet is Dragonscale one, slot is Hair (2) or (31) with GetMaskForSlot. Even tried a complete iteration :

int i = 0WHILE i != -1 && i < 129if ( (PlayerRef.GetWornForm(i) as Armor) )	 Notification("Slot = "+i) ; never shown	 i = -1else	 i += 1endifEndWHILE

But, i just saw that someone reported an issue in the SKSE thread (because of the update) : no longer getting the Armor partMask. I bet it's that.
User avatar
Cash n Class
 
Posts: 3430
Joined: Wed Jun 28, 2006 10:01 am


Return to V - Skyrim