Jump to content

Removing the notifications from RemoveAllItems used on player


DiodeLadder

Recommended Posts

After reading Wolfmark's reply, still using F4SE, I've implemented some of the things he said:

FormList Property ScriptFilledFormList Auto Const
Form Property Pipboy Auto Const

Bool Function FillFormList(Form[] Items)
	ScriptFilledFormList.Revert()
	Int i = 0
	While i < Items.Length
		Form CurrentForm = Items[i]
		If(Pipboy != CurrentForm)
			ScriptFilledFormList.AddForm(CurrentForm)
		EndIf
		i += 1
	EndWhile
	Return True
EndFunction

Function RemoveAllItemsSilent(ObjectReference akActorRef, ObjectReference DestContainerRef)
	If(FillFormList(akActorRef.GetInventoryItems()))
		akActorRef.RemoveItem(akItemToRemove = ScriptFilledFormList, aiCount = -1, abSilent = True, akOtherContainer = DestContainerRef)
	EndIf
EndFunction

It changes the behavior of the function as is expected: takes a second or 2 to fill the FormList, but then it removes everything in a fraction of second.

 

Thank very much DieFeM! Using SE is not something I'd want to do, but the fill formlist function example you provided is going to be very useful for me in other situations. I've learned a lot from your contributions in this thread for sure! :smile:

 

I think I'm going to settle for the compromise Wolfmark suggested, by using both RemoveItem (formlist) and RemoveAllItems (the rest) to minimize the notifications. I've just tried it, and it's definitely an improvement. Notifications still show, but short enough that I think this will be okay. Thank you very much Wolfmark!

Link to comment
Share on other sites

  • Replies 40
  • Created
  • Last Reply

Top Posters In This Topic

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...