Jump to content

Simple script help


Potatoskin

Recommended Posts

OK making this very simple

 

all I want to do is have a set of armor to be un-equipable after equipping.

 

That is the long and short of it, My problem is the script is not working ... no script is working...I followed directions on the Creation kit website for making gloves that add blizzard to your character and even that dose not work.

 

It took me like 3 days just to figure out how to compile without errors.

 

Any help would be great

 

BTW I followed this ----> https://www.creationkit.com/index.php?title=Adding_Working_Scripts_to_Items <---- step by step just to get something to work and It did not work.

Link to comment
Share on other sites

In order to have an item be unable to be un-equipped by the player, the item has to be equipped by script. This might mean having a dummy item that the player equips in the same slot and then use a script to force equip the real item.

 

This example simple script uses a reference alias script which could be used for the player.

Scriptname SomeScript Extends ReferenceAlias

Armor Property MyArmor Auto
Armor Property MyDummyArmor Auto
Actor ActorRef

Event OnInit()
  ActorRef = Self.GetReference()
EndEvent

Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference)
  If akBaseObject as Armor == MyDummyArmor
    ActorRef.EquipItem(MyArmor, true, true)
  Endif
EndEvent

You may need more or less than this. At least it is a start to get you in the right direction. What prevents the player from unequipping the armor is the second parameter in the EquipItem function

Link to comment
Share on other sites

  • Recently Browsing   0 members

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