Has the hide helmets feature already been integrated as of the latest patch?
1130210
Member Posts: 381
If so, how do I go about hiding my helmet?
0
Comments
if (GetBaseItemType(oItem) == BASE_ITEM_HELMET) { SetHiddenWhenEquipped(oItem, TRUE); }
It would stop all helmets from being visible.
It totally depends on how you want to implement it. Is it for each player to decide? If so you will need to provide a way for the player to set a variable on themselves or what not that the above script chunk could check to make it only happen for that player. That could be an npc conversation or an item that the player can use to toggle it on/off. Or even a unique power for the helmet itself, etc.
Personally these are the things I like to add to the unique power of the players Handbook. When used it can start a conversation to do all kinds of stuff like get unstuck, save location, and now hide helmets or cloaks just for some examples.
if (GetBaseItemType(oItem) == BASE_ITEM_HELMET) { SetHiddenWhenEquipped(oItem, TRUE); }
Now if you wanted to check for a variable on an item the player possesses that they have already set with another script then you would use something like this in the modules OnPlayerEquipItem event (this one using a player handbook for example):
object oHandbook = GetItemPossessedBy(oPC, "HAND_BOOK"); if (GetIsObjectValid(oHandbook)) { int iHideHelm = GetLocalInt(oHandbook, "HIDE_HELM"); int iHideCloak = GetLocalInt(oHandbook, "HIDE_CLOAK"); if ((iHideHelm == TRUE) && (GetBaseItemType(oItem) == BASE_ITEM_HELMET)) { SetHiddenWhenEquipped(oItem, TRUE); } if ((iHideCloak == TRUE) && (GetBaseItemType(oItem) == BASE_ITEM_CLOAK)) { SetHiddenWhenEquipped(oItem, TRUE); } }