SevenBlue Posted March 30, 2020 Share Posted March 30, 2020 Title says it all. I've been out of the modding game for a while so if anyone could point me in the direction of a tutorial or give me some pointers on how to do this I'd be much obliged. Link to comment Share on other sites More sharing options...
Zorkaz Posted March 30, 2020 Share Posted March 30, 2020 There are several versions to do this. One would be with a randomintFor instance you could put this script on your container MiscItem Property TheItem AutoInt Property RandomInteger Auto Event OnInit() / Onload(); Onload means it does work when you load the cell where the container is in itRandominteger = utility.randomint(1,4);Creates a random number from 1 to 4Utility.WaitGameTime(RandomInteger);Wait 1-4 hoursSelf.RemoveAllItems(akTransferTo = None, abKeepOwnership = false);This means the container will self-empty itselfself.additem(TheItem, 1);This will add the itemEndevent Now if you want to make this a looping script you'd have to make the script this way Event OnInit()While self.isenabled()... Insert script stuffEndwhileEndEvent Instead of a MiscObject (Item) you can also use potions and formlists. Bear in mind that this is based on Fallout 4, so there might be a difference here and there.Onload() is of course the worse option here, since it will only affect your container if your cell has been loaded. OnInit() would mean it starts right away. However if you have multiple custom containers (Eg. 60) it could mean that a lot of scripts are running in the background Link to comment Share on other sites More sharing options...
Zorkaz Posted March 30, 2020 Share Posted March 30, 2020 Optionally an alternative:Everytime you visit the container area it has a chance of self resetting Event onload()while self.isenabled()RandomInteger = utility.randomint(1, :cool:; a chance of 1 in 8if randomint == 1Self.RemoveAllItems(akTransferTo = None, abKeepOwnership = false);Clear containerself.additem(TheItem, 1)EndifEndwhileEndevent The smiley is supposed to be: 8 ) Link to comment Share on other sites More sharing options...
Recommended Posts