Difference between revisions of "GetWornItem - Actor"
Jump to navigation
Jump to search
imported>Qazaaq m (Moved category tags to bottom of page.) |
imported>Qazaaq (Fixed details about the difference in slot index and slot number) |
||
Line 1: | Line 1: | ||
[[Category:Scripting]] | |||
[[Category:Papyrus]] | |||
[[Category:F4SE]] | |||
'''F4SE Member of:''' [[Actor Script]] | '''F4SE Member of:''' [[Actor Script]] | ||
Line 29: | Line 32: | ||
{For each biped slot} | {For each biped slot} | ||
Actor Player = Game.GetPlayer() | Actor Player = Game.GetPlayer() | ||
int index = | int index = 0 | ||
int | int end = 43 const | ||
while (index < | while (index < end) | ||
Actor:WornItem wornItem = Player.GetWornItem(index) | Actor:WornItem wornItem = Player.GetWornItem(index) | ||
Debug.Trace("Slot: " + index + ", " + wornItem) | Debug.Trace("Slot: " + index + ", " + wornItem) | ||
Line 40: | Line 43: | ||
== Notes == | == Notes == | ||
* | *Returns a none struct beyond index 43 as those are actually invalid. | ||
*Slots with empty forms are just empty slots. | |||
== See Also == | == See Also == | ||
Line 46: | Line 50: | ||
*[[Biped Slots]] | *[[Biped Slots]] | ||
*[[WornItem Struct - Actor]] | *[[WornItem Struct - Actor]] | ||
Revision as of 19:11, 22 April 2017
F4SE Member of: Actor Script
Obtains WornItem information about an actors Biped Slot.
Syntax
WornItem Function GetWornItem(int slotIndex, bool firstPerson = false) Native
Parameters
- slotIndex: The Biped Slot to check.
- firstPerson: Specifies whether first or third person information for the Biped Slot should be returned.
Return Value
The WornItem for the given Biped Slot.
Examples
Actor:WornItem wornItem= Game.GetPlayer().GetWornItem(34)
Debug.Trace("Item: " + wornItem.Item)
Debug.Trace("Model: " + wornItem.Model)
Debug.Trace("ModelName: " + wornItem.ModelName)
Debug.Trace("MaterialSwap: " + wornItem.MaterialSwap)
Debug.Trace("Texture: " + wornItem.Texture)
{For each biped slot}
Actor Player = Game.GetPlayer()
int index = 0
int end = 43 const
while (index < end)
Actor:WornItem wornItem = Player.GetWornItem(index)
Debug.Trace("Slot: " + index + ", " + wornItem)
index += 1
EndWhile
Notes
- Returns a none struct beyond index 43 as those are actually invalid.
- Slots with empty forms are just empty slots.