Difference between revisions of "GetWornItem - Actor"
Jump to navigation
Jump to search
imported>Qazaaq (Using slot index and not the slot number.) |
imported>Qazaaq (added required f4se version) |
||
Line 1: | Line 1: | ||
'''F4SE Member of:''' [[Actor Script]] | '''F4SE Member of:''' [[Actor Script]] | ||
{{Template:Papyrus:RequiredF4SE|version=0.2.0}} | |||
Obtains [[WornItem Struct - Actor|WornItem]] information about an actors [[Biped Slots|Biped Slot]]. | Obtains [[WornItem Struct - Actor|WornItem]] information about an actors [[Biped Slots|Biped Slot]]. | ||
Line 50: | Line 48: | ||
*[[Biped Slots]] | *[[Biped Slots]] | ||
*[[WornItem Struct - Actor]] | *[[WornItem Struct - Actor]] | ||
[[Category:Scripting]] | |||
[[Category:Papyrus]] | |||
[[Category:F4SE]] |
Revision as of 00:42, 21 January 2018
F4SE Member of: Actor Script
Requires F4SE version 0.2.0 or higher.
Obtains WornItem information about an actors Biped Slot.
Syntax
WornItem Function GetWornItem(int slotIndex, bool firstPerson = false) Native
Parameters
- slotIndex: The Biped Slot index 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 index.
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: " + 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.