Here's a snippet of what I'm using and I'll explain. Hopefully someone with more scripting experience can explain the problem.
if ( Block > 4 ) if ( player->GetArmorType, 8 > -1 ) player->addspell, "NX9_Block_Master" elseif ( player->GetArmorType, 8 == -1 ) player->RemoveSpell, "NX9_Block_Master" endifendif
The context of this,is that I'm incorporating Oblivion like mastery levels to each skill. At level 25 you become an apprentice, 50 a journeyman, 75 expert, and 100 master. At each level, you get an additional perk to make that skill even more beneficial in some way. I've had success with all of my sneak based scripting, so that if you're using a short blade while sneaking you get a bonus, etc.. but I can't seem to get anything that uses the GetArmorType command to work.
In each case, like the one I posted above, the line with GetArmorType seems to be ignored. The script functions in the sense that I don't get any in game errors. What happens is that no matter what, the effect is added. According to how the command works (as far as I'm reading it anyways) GetArmorType 8(shield) > -1(Unarmored) should trigger if that slot has anything equipped to it other than being unarmored correct? Then the elseif lne should make it so that if GetArmorType 8(shield) == -1(Unarmored) the spell should be removed. However, I walk around with no shield, and have the effect.
A little insight on this would be greatly appreciated.