Difference between revisions of "AddForm - LeveledItem"

Jump to navigation Jump to search
769 bytes removed ,  18:32, 8 June 2012
Removed GetGameLoaded as v1.6+ fixes the bug.
imported>JustinOther
m
imported>JustinOther
(Removed GetGameLoaded as v1.6+ fixes the bug.)
Line 23: Line 23:
CoolItems.AddForm(Axe, 5, 2)
CoolItems.AddForm(Axe, 5, 2)
</source>
</source>
== Notes ==
*Currently (v1.5.26.0), forms added to leveled items in this manner will not persist in save games, unlike [[AddForm - FormList]]. This can be demonstrated or even exploited with the below, a jury rigged GetGameLoaded() function.
<source lang="papyrus">Bool Function GetGameLoaded(LeveledItem akLeveledItem = None, Form apForm = None, ObjectReference akContainer = None)
        akContainer.AddItem(akLeveledItem, 1, True)
        If akContainer.GetItemCount(apForm)
                akContainer.RemoveItem(apForm, akContainer.GetItemCount(apForm), True)
                Return False
        Else ; Will only return 'True' once per save load
                akLeveledItem.AddForm(apForm, 1, 1)
                Return True
        EndIf
EndFunction</source>


== See Also ==
== See Also ==
*[[LeveledItem Script]]
*[[LeveledItem Script]]
*[[Revert - LeveledItem]]
*[[Revert - LeveledItem]]
Anonymous user

Navigation menu