... Copypasta(Game.GetPlayer(), MQ101AlduinREF)...Function Copypasta(ObjectReference akSourceContainer = None, ObjectReference akDestContainer = None, Int aiIndex = 0, Form akForm = None) aiIndex = akSourceContainer.GetNumItems() While (aiIndex > 0) aiIndex -= 1 akForm = akSourceContainer.GetNthForm(aiIndex) akDestContainer.AddItem(akForm, akSourceContainer.GetItemCount(akForm)) EndWhileEndFunction...will give copy the player's inventory to Alduin, for instance.
Float fSKSEEvent SomeEvent() fSKSE = SKSE.GetVersion() + SKSE.GetVersionMinor() * 0.01 + SKSE.GetVersionBeta() * 0.0001 If fSKSE >= 1.0504 ; Earliest version with GetNumItems/GetNthForm Copypasta(Game.GetPlayer(), MQ101AlduinREF) Else ; Alternate method EndIfEndEvent
Form akForm = akSourceContainer.GetNthForm(aiIndex)to this
akForm = akSourceContainer.GetNthForm(aiIndex)
Function Copypasta(ObjectReference akSourceContainer = None, ObjectReference akDestContainer = None, Int aiIndex = 0, Form akForm = None) aiIndex = akSourceContainer.GetNumItems() While (aiIndex > 0) aiIndex -= 1 akForm = akSourceContainer.GetNthForm(aiIndex) akDestContainer.AddItem(akForm, akSourceContainer.GetItemCount(akForm)) EndWhileEndFunctionI'd changed it last minute, but forgot to remove 'Form' when making it an argument again.
fSKSE = SKSE.GetVersion() + SKSE.GetVersionMinor() * 0.01 + SKSE.GetVersionBeta() * 0.0001 If fSKSE >= 1.0504 ; Earliest version with GetNumItems/GetNthForm
If SKSE.GetVersionRelease() >= 21 ; Earliest version release with GetNumItems/GetNthForm