Jump to content

how to can I make a bobblehead stand with a container and auto populate the Stand


Recommended Posts

So i am working on a Player Base mod. and I am using a Auto-Sorter to dump items from a central box into item containers. this is working for me. but I have ran into one issue that i cannot seems to work around.

when a Bobblehead is placed into the Auto-Sorter. the bobble-Head is transferred into the Bobblehead shelf inventory. but it i does not show on the Shelf. until a player goes to the shelf. removes the Bobblehead from the inventory and then puts it back in. I have been looking for a way to trigger the bobblehead shelf to automatically display the bobble head. but I cannot get it to work

 

Sorry if this was asked before. I have been looking for any posts / Videos / tutorials on this for a while. and have not found anything that helps me.

 

 

 

Link to comment
Share on other sites

You need to be looking at BobbleheadStandContainerScript to see what is happening.

 

If the stand has never loaded before it will be missing a BobbleheadsInContainer array which could be detected and fixed (this may not work on an uninitialized array, dunno you need to test):

If ((StandObjectReference as BobbleheadStandContainerScript).BobbleheadsInContainer.Length == 0)
   (StandObjectReference as BobbleheadStandContainerScript).BobbleheadsInContainer = New Form[0]
EndIf

Then the Event OnItemAdded should detect your bobblehead add, but it doesnt do anything as script activity is triggered by Event OnActivate which you can try to trigger remotely;

StandObjectReference.Activate(akActivator = Game.GetPlayer(), abDefaultProcessingOnly = false)

Understanding that if the stand does not have 3d loaded (or other conditions) things may go wrong as this is perpetrating unnatural acts on a system that was not designed to do this stuff.

Link to comment
Share on other sites

did not think that this would have been a unnatural act,

Thank you for the help. but it did not work for me.

it is good enough that the sorter is putting bobbleheads into the shelves inventory. will just have to live with having to pull them out and putting them back in to get them to show.

 

Thanks again

Link to comment
Share on other sites

  • Recently Browsing   0 members

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