Jump to content

[HELP] Need help with setting up a simple equip object script


Recommended Posts

Hi all,

 

 

So basically long story short, i have two pieces of hair that use two different cloth havok files. I can equip them at the same time simply adding second as an extra part, but the problem is that game is limited to one havok file per equipped object, so the havok files in extra objects are neglected by the engine. This can be solved by simply equipping a clothing item with the needed havok file. Now i am trying to make this an auto process. I Have set up quest script and created the needed properties but i relly need help with scripting. Basically i need to implement this https://falloutck.uesp.net/wiki/HasExtraPart_-_HeadPart into my script.

 

When certain type of hair is worn to add and equip a clothing item and remove when not needed. I have started out with this but i surely have no idea on how to set up the script correctly:

Scriptname AlexLaraHairScript extends Quest







HeadPart Property LaraHairProperty Auto Const

Armor Property AlexLaraPhyProperty Auto Const







Function AlexLaraEquipHair()



Actor PlayerREF = Game.GetPlayer()



If (PlayerREF.GetItemCount(AlexLaraPhyProperty as Form) > 1)


It should go something like:
detect if hair is worn and if there is no additional clothing piece add one and equip
otherwise uequip and remove



Game.GetPlayer().AddItem(AlexLaraPhyProperty, 1, true)

Game.GetPlayer().EquipItem(AlexLaraPhyProperty)

Debug.MessageBox("i run")

EndFunction

Any help appreciated.

 

Link to comment
Share on other sites

  • 2 weeks later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...