Jump to content

Updated Bag of Trash


Benrahir

Recommended Posts

I think that the thing about the text appearing is easily forgetteable, because the advantage it has compared to the Bag of Trash mod (which has to be "equipped", and thus occupies a body slot for a brief time) is more of the worth of that extremely little annoyance. You can even mention this in the description =)

 

As for "delete at closing"...that's what the Bag of Trash mod does itself...you may want to investigate how it does it...

 

Anyway, I'll be AFK until night, so I'll be glad to test any new versions then :)

Link to comment
Share on other sites

Let me help with some of that scripting

 

I used this on a "bag of holding" to prevent it from being stored inside itself

Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)
	If akNewContainer == abimSatchelREF
		abimSatchelREF.RemoveItem(abimSatchelA)
		PlayerRef.AddItem(abimSatchelA,1,True)
		Debug.Notification("Cannot store within itself")
	EndIf
EndEvent

abimSatchelREF was a property that held the reference to the container that I used for the BoH

abimSatchelA was a property that held the inventory object which was used to activate the BoH

PlayerRef was a property that auto-filled with the player data

Link to comment
Share on other sites

Very useful, yes! I'll be sure to note your help in the mod credits. Thanks, IsharaMeradin! :3 Unfortunately, I can't seem to figure out how the "delete at close" thing works on the original mod. Is the delete on close feature a must, or is it workable as-is? (Given that it will no longer be able to erase itself?)

Link to comment
Share on other sites

The delete on close...

 

Not actually a delete on close but a delete on open...

 

Add this line to the OnEquipped or OnActivate event of the object used to activate the container. Place it BEFORE the container activation line.

TrashContainer.RemoveAllItems()

with TrashContainer being whatever property you are using for the container reference.

 

It gives the same result and with less headache in the coding. The player won't know that the objects are technically still there as the objects will be gone when it is next open.

Link to comment
Share on other sites

The delete on close...

 

Not actually a delete on close but a delete on open...

 

Add this line to the OnEquipped or OnActivate event of the object used to activate the container. Place it BEFORE the container activation line.

TrashContainer.RemoveAllItems()

with TrashContainer being whatever property you are using for the container reference.

 

It gives the same result and with less headache in the coding. The player won't know that the objects are technically still there as the objects will be gone when it is next open.

 

Well, it's also possible that Bag of Trash does a delete ON open...as it really doesn't matter when it deletes them (either when you close the menu, or you open it anew, the items will be gone anyway) :lol:

 

But anyways, if you can now review the items before closing the menu...it's all OK :D (testing 1.1 right now).

Link to comment
Share on other sites

  • Recently Browsing   0 members

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