Difference between revisions of "GetWornItemMods - Actor"
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[] | ObjectMod[] objectMods = Game.GetPlayer().GetWornItemMods(LeftHand) | ||
If ( | If (objectMods) | ||
int index = 0 | int index = 0 | ||
While (index < | While (index < objectMods.Length) | ||
Debug.Trace("Found the object mod '" + | Debug.Trace("Found the object mod '" + objectMods[index] + "' on slot index " + LeftHand) | ||
index += 1 | index += 1 | ||
EndWhile | EndWhile |