Skip to content

Has the hide helmets feature already been integrated as of the latest patch?

If so, how do I go about hiding my helmet?

Comments

  • NeverwinterWightsNeverwinterWights Member Posts: 339
    edited December 2017
    One really quick example. If you added these lines to your modules OnPlayerEquipItem event:

    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.
    Post edited by NeverwinterWights on
  • NeverwinterWightsNeverwinterWights Member Posts: 339
    So apparently editing posts for some reason is causing mine to be deleted? Before the above script to check for variables I posted a very simple example that would hid helmets for all players if added to the modules OnPlayerEquipItem event:

    if (GetBaseItemType(oItem) == BASE_ITEM_HELMET) { SetHiddenWhenEquipped(oItem, TRUE); }
  • ShadowMShadowM Member Posts: 573
    edited December 2017
    You want && in there not || plus you want to add in checks to see if the items has already been flag to hidden if the pc equipping it do not want to hide his/her cloak and/or helm and set it to not hide. This should probably moved to the scripting forum.
  • NeverwinterWightsNeverwinterWights Member Posts: 339
    edited December 2017
    ShadowM said:

    You want && in there not ||

    Like I've been saying...I'm rusty as heck. Thanks Shadow.

    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); } }
  • NeverwinterWightsNeverwinterWights Member Posts: 339
    ShadowM said:

    You want && in there not || plus you want to add in checks to see if the items has already been flag to hidden if the pc equipping it do not want to hide his/her cloak and/or helm and set it to not hide. This should probably moved to the scripting forum.

    Agreed scripting forum would be better. And one of my posts that was deleted I mentioned that it totally depends on how OP wants to implement this. I just posted example script. Nothing finished or definite.
    IndyWendieGo
Sign In or Register to comment.