Jump to content

Creating script to removeallitems and transfer to chest


Recommended Posts

Posted

So I'm making a dungeon to where all items in players inventory are removed and relocated into a chest similar to how the jail setup happens when player is arrested. It'll be a custom script, for the player will be blacked out and awaken in an asylum with a collar on that restrains magic. I already done the collar part. I just need to figure out how to setup the removeitems and setup outfit on player.

 

So far this is what I have for removeitems.

 

Game.GetPlayer().RemoveAllItems(abRemoveQuestItems().akTransferTo = asylumChest)

 

Is this accurate?

Posted

Idk what youre doing with that script but Im suprised and impressed if that even compiles

 

For the remove all items part, you simply do:

 

ObjectReference Property myChest Auto

Game.GetPlayer().RemoveAllItems(myChest, true)

 

myChest is a property pointing at the chest the items are being transfered to

we set that 2nd paremeter to true to make sure you dont end up stealing your own items when you want to retrieve your items from the chest some other time 

 

Also make sure the container youre transfering the items to has the "Respawn" Flag unticked or else those Items will get deleted

 

For the Outfit:

Are you using an "Outfit" form inside the CK to store all your armors? or are you defining all your Armor parts inside the Script? In a formlist? In a container?

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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