Difference between revisions of "GetWornItemMods - Actor"

184 bytes added ,  21:16, 26 April 2017
change the examples
imported>Qazaaq
(Using slot index and not the slot number.)
imported>Qazaaq
(change the examples)
Line 9: Line 9:
== Syntax ==
== Syntax ==
<source lang="papyrus">
<source lang="papyrus">
; Get the players left hand object mods.
ObjectMod[] Function GetWornItemMods(int slotIndex) Native
ObjectMod[] Function GetWornItemMods(int slotIndex) Native
</source>
</source>
Line 20: Line 21:
== Examples ==
== Examples ==
<source lang="papyrus">
<source lang="papyrus">
ObjectMod[] objectMods = Game.GetPlayer().GetWornItemMods(4)
</source>
<source lang="papyrus">
{For each object mod}
int LeftHand = 4 const
int LeftHand = 4 const
ObjectMod[] mods = Game.GetPlayer().GetWornItemMods(LeftHand)
ObjectMod[] objectMods = Game.GetPlayer().GetWornItemMods(LeftHand)
If (mods)
If (objectMods)
     int index = 0
     int index = 0
     While (index < mods.Length)
     While (index < objectMods.Length)
         Debug.Trace("Found the object mod '" + mods[index] + "' on slot index " + LeftHand)
         Debug.Trace("Found the object mod '" + objectMods[index] + "' on slot index " + LeftHand)
         index += 1
         index += 1
     EndWhile
     EndWhile
Anonymous user